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
|
else
|
||||||
{
|
{
|
||||||
// Per definition use the port number plus ten for the client to make
|
// if the port is not available, try "NUM_SOCKET_PORTS_TO_TRY" times
|
||||||
// it possible to run server and client on the same computer. If the
|
// with incremented port numbers
|
||||||
// port is not available, try "NUM_SOCKET_PORTS_TO_TRY" times with
|
quint16 iClientPortIncrement = 0;
|
||||||
// incremented port numbers.
|
|
||||||
quint16 iClientPortIncrement = 10; // start value: port nubmer plus ten
|
|
||||||
bSuccess = false; // initialization for while loop
|
bSuccess = false; // initialization for while loop
|
||||||
|
|
||||||
while ( !bSuccess && ( iClientPortIncrement <= NUM_SOCKET_PORTS_TO_TRY ) )
|
while ( !bSuccess && ( iClientPortIncrement <= NUM_SOCKET_PORTS_TO_TRY ) )
|
||||||
|
|
Loading…
Reference in a new issue