irclib.client



class IrcClientException : irclib.protocol.IrcProtocolException;


this(char[] msg);


class IrcClient : irclib.protocol.IrcProtocol;


const ushort DEFAULT_PORT ;


this(char[] serverHost, ushort serverPort);


this(char[] serverHostAndPort);
"server.host" or "server.host:port"

this();


final void serverHost (char[] host);
Property:
set

final char[] serverHost ();
Property:
get

final void serverPort (ushort port);
Property:
set

final ushort serverPort ();
Property:
get

protected void prepareHostResolve (char[] host);
This function should begin resolving host and call finishHostResolve() when completed successfully.

This implementation calls InternetHost.getHostByName(). Override to change behavior.

protected void finishHostResolve (InternetHost ih);
Calls connect() with a random address from the InternetHost and the serverPort. Override to change behavior.

protected void prepareConnection (InternetAddress ia);
This function should begin connecting the socket to the specified address and call finishConnection() when connected successfully.

This implementation calls Socket.connect(). Override to change behavior.

The socket property should be used to get the socket to connect on.

protected void finishConnection ();
The connection is established and now it's time to communicate with the server.

The socket *must not* be blocking by the time the IQueue is created.

This function should call IrcProtocol.serverConnected() with a new IQueue and call waitForEvent() to wait for socket events.

protected void waitForEvent ();
This function should wait for socket events, manipulate the queue, and call the appropriate server events of IrcProtocol.

The IrcProtocol.queue property can be used to get the queue.

This implementation calls Socket.select(). Override to change behavior.

The socket property should be used to get the socket.

protected void onConnectionError ();


protected void serverDisconnected ();


final void connect ();


protected Socket createSocket ();
Override to use different socket types.

final void connect (InternetAddress remoteAddress);
Does not bother resolving serverHost and connects to remoteAddress.

Params:
InternetAddress remoteAddress should be an IP address of serverHost.

protected final Socket socket ();
Property:
get

protected final ClientQueue clientQueue ();
Property:
get

class ClientQueue : irclib.protocol.IQueue;
The socket *must not* be blocking.

this(Socket sock);


void onSendComplete ();


void onDataReceived (void[] data);


void write (void[] data);


void[] read (int nbytes);


void[] read ();


void[] peek ();


int writeBytes ();
Property:
get the number of bytes in the write queue.

final Socket socket ();
Property:
get

Page was generated with on Sat Nov 3 13:52:19 2007