rero.dcc

Class ListenDCC

public class ListenDCC extends GenericDCC

Field Summary
protected static intoffset
protected ServerSocketserver
protected static inttimeout
Method Summary
SocketestablishConnection()
intgetListenerPort()
instructs the class to listen for a connection on some port, returns the port as an integer.
static intgetNextPort()

Field Detail

offset

protected static int offset

server

protected ServerSocket server

timeout

protected static int timeout

Method Detail

establishConnection

public Socket establishConnection()

getListenerPort

public int getListenerPort()
instructs the class to listen for a connection on some port, returns the port as an integer. A return value of -1 indicates there was a problem binding to the port. Doh!@

getNextPort

public static int getNextPort()