|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jackofalltrades.irc.BaseConnection
net.jackofalltrades.irc.dcc.BaseDccConnection
net.jackofalltrades.irc.dcc.DccTextConnection
Implements the DCC spec for text connections (ie. DCC chats).
A DCC request is received from another client as a CTCP message within
a PRIVMSG command. The format of the DCC CHAT command is
DCC CHAT chat <ip-address> <port>. The ip-address
is actually an unsigned integer, in network byte format, representing the
IP Address of the machine with which to connect. The unsigned integer must
be converted to an InetAddress
before connection can be
established.
InetAddress address = InetAddressUtils.toInetAddress(<ip-address>);
Field Summary |
Fields inherited from class net.jackofalltrades.irc.BaseConnection |
DEFAULT_BUFFER_SIZE, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_READ_WRITE_TIMEOUT, MAX_PORT, MIN_PORT |
Constructor Summary | |
DccTextConnection()
Creates a new DccTextConnection . |
|
DccTextConnection(java.net.InetAddress remoteHost,
int port)
Creates a new DccTextConnection to connect to the specified
remote host. |
|
DccTextConnection(java.net.Socket socket)
Creates a new DccTextConnection connected on the specified
java.net.Socket . |
|
DccTextConnection(java.lang.String remoteHost,
int port)
Creates a new DccTextConnection to connect to the specified
remote host. |
Method Summary | |
protected void |
processInput()
Reads the commands from the , and notifies IrcCommandListeners events. |
protected void |
wrapInput(java.io.InputStream input)
Wraps the InputStream in a java.io.Reader . |
Methods inherited from class net.jackofalltrades.irc.dcc.BaseDccConnection |
addDccDataListener, dataPrepared, dataReceived, fireDataReceived, removeDccDataListener, wrapOutput |
Methods inherited from class net.jackofalltrades.irc.BaseConnection |
addConnectionListener, addEventListener, connect, disconnect, getBufferSize, getConnectionTimeout, getEventListeners, getLastException, getPortNumber, getReadWriteTimeout, getRemoteHost, isConnected, removeConnectionListener, removeEventListener, run, setBufferSize, setConnectionTimeout, setLastException, setPortNumber, setReadWriteTimeout, setRemoteHost |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DccTextConnection()
DccTextConnection
.
public DccTextConnection(java.net.InetAddress remoteHost, int port)
DccTextConnection
to connect to the specified
remote host.
remoteHost
- the java.net.InetAddress
of the remote
host.port
- the port number on the remote host.
java.lang.IllegalArgumentException
- if remoteHost
is
null or if port
is not in the range 1 - 65535.public DccTextConnection(java.lang.String remoteHost, int port) throws java.net.UnknownHostException
DccTextConnection
to connect to the specified
remote host.
remoteHost
- the name of the remote host.port
- the port number on the server.
java.net.UnknownHostException
- if the remoteHost
cannot be resolved.
java.lang.IllegalArgumentException
- if the remoteHost
public DccTextConnection(java.net.Socket socket)
DccTextConnection
connected on the specified
java.net.Socket
.
socket
- the Socket
connected to the remote host.Method Detail |
protected void processInput() throws java.io.IOException
IrcCommandListeners
events.
processInput
in class BaseConnection
java.io.IOException
- if an I/O error occurs.protected void wrapInput(java.io.InputStream input)
InputStream
in a java.io.Reader
.
wrapInput
in class BaseConnection
input
- the InputStream
from the underlying
java.net.Socket
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |