class ClientSocket

Socket subclass that allows client-style connections. Socket subclass that defines a connectTo method to allow client-style connections. More...

Definition#include <IRCModule.h>
InheritsSocket
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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:
hostHostname or IP address of the machine to connect to.
prtTCP 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:
hostHostname or IP address of the machine to connect to.
prtTCP 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:
hostHostname or IP address of the machine to connect to.
prtTCP 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:
hostHostname or IP address of the machine to connect to.
prtTCP port on which to attempt a connection.

Returns: true if the connection was established, false if an error occured.