|
|
See also: Socket, ServerSocket
| ClientSocket (const QString& host, const int port) |
Initialize a ClientSocket object and connect to the specified host/port. You must manually check isConnected() when using this constructor, since there is no way to check if the connection was accepted or rejected.
Parameters:
| host | Hostname or IP address of the machine to connect to. |
| prt | TCP port on which to attempt a connection. |
| ClientSocket (const char* host, const int port) |
Initialize a ClientSocket object and connect to the specified host/port. You must manually check isConnected() when using this constructor, since there is no way to check if the connection was accepted or rejected.
Parameters:
| host | Hostname or IP address of the machine to connect to. |
| prt | TCP port on which to attempt a connection. |
| bool connectTo (const QString& host, const int port) |
Attempt a connection to the specified host/port.
PRECONDITIONS: !isConnected()
Parameters:
| host | Hostname or IP address of the machine to connect to. |
| prt | TCP port on which to attempt a connection. |
Returns: true if the connection was established, false if an error occured.
| bool connectTo (const char* host, const int port) |
Attempt a connection to the specified host/port.
PRECONDITIONS: !isConnected()
Parameters:
| host | Hostname or IP address of the machine to connect to. |
| prt | TCP port on which to attempt a connection. |
Returns: true if the connection was established, false if an error occured.