|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jackofalltrades.irc.BaseConnection net.jackofalltrades.irc.dcc.BaseDccConnection net.jackofalltrades.irc.dcc.DccBinaryConnection
Implements the DCC spec for binary connections (ie. DCC sends).
A DCC request is received from another client as a CTCP message within
a PRIVMSG command. The format of the DCC SEND command is
DCC SEND <file-name> <ip-address> <port>
[<file-size>]. 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 | |
DccBinaryConnection()
Creates a new DccBinaryConnection . |
|
DccBinaryConnection(java.net.InetAddress remoteHost,
int port)
Creates a new DccBinaryConnection to connect to the specified
remote host. |
|
DccBinaryConnection(java.net.Socket socket)
Creates a new DccBinaryConnection connected on the specified
java.net.Socket . |
|
DccBinaryConnection(java.lang.String remoteHost,
int port)
Creates a new DccBinaryConnection 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 DccBinaryConnection()
DccBinaryConnection
.
public DccBinaryConnection(java.net.InetAddress remoteHost, int port)
DccBinaryConnection
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 DccBinaryConnection(java.lang.String remoteHost, int port) throws java.net.UnknownHostException
DccBinaryConnection
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 DccBinaryConnection(java.net.Socket socket)
DccBinaryConnection
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 |