in reply to IO:: SOCKET Check Port, Please Help!
Why 16 ports? Do you realise you can have 16 processes listening to the same port?
If there are processes blocked on accept, one of them (and only one) will receive the request. If there are no processes blocked on accept, the first one to call accept will receive the request.
You do this by creating the socket in one process, and passing the handle to the other processes. This is usually done using inheritance at process creation time, but other means of passing file handles should work too.
|
|---|