if -p [port] is given for the client, you get [port]+10 -> change this to that you get what you set (if available)
This commit is contained in:
parent
15d38baae9
commit
07a92fb2c2
1 changed files with 3 additions and 5 deletions
|
@ -65,11 +65,9 @@ void CSocket::Init ( const quint16 iPortNumber )
|
|||
}
|
||||
else
|
||||
{
|
||||
// Per definition use the port number plus ten for the client to make
|
||||
// it possible to run server and client on the same computer. If the
|
||||
// port is not available, try "NUM_SOCKET_PORTS_TO_TRY" times with
|
||||
// incremented port numbers.
|
||||
quint16 iClientPortIncrement = 10; // start value: port nubmer plus ten
|
||||
// if the port is not available, try "NUM_SOCKET_PORTS_TO_TRY" times
|
||||
// with incremented port numbers
|
||||
quint16 iClientPortIncrement = 0;
|
||||
bSuccess = false; // initialization for while loop
|
||||
|
||||
while ( !bSuccess && ( iClientPortIncrement <= NUM_SOCKET_PORTS_TO_TRY ) )
|
||||
|
|
Loading…
Reference in a new issue