- @return WaitOnConnect() returns @true if the connection request completes.
- This does not necessarily mean that the connection was
- successfully established; it might also happen that the
- connection was refused by the peer. Use wxSocketBase::IsConnected()
- to distinguish between these two situations.
- @n @n If the timeout elapses, WaitOnConnect() returns @false.
- @n @n These semantics allow code like this:
- @code
- // Issue the connection request
- client->Connect(addr, false);
-
- // Wait until the request completes or until we decide to give up
- bool waitmore = true;
- while ( !client->WaitOnConnect(seconds, millis) && waitmore )
- {
- // possibly give some feedback to the user,
- // and update waitmore as needed.
- }
- bool success = client->IsConnected();
- @endcode
+ @return
+ WaitOnConnect() returns @true if the connection request completes.
+ This does not necessarily mean that the connection was
+ successfully established; it might also happen that the
+ connection was refused by the peer. Use wxSocketBase::IsConnected()
+ to distinguish between these two situations.
+ @n @n If the timeout elapses, WaitOnConnect() returns @false.
+ @n @n These semantics allow code like this:
+ @code
+ // Issue the connection request
+ client->Connect(addr, false);
+
+ // Wait until the request completes or until we decide to give up
+ bool waitmore = true;
+ while ( !client->WaitOnConnect(seconds, millis) && waitmore )
+ {
+ // possibly give some feedback to the user,
+ // and update waitmore as needed.
+ }
+ bool success = client->IsConnected();
+ @endcode