rero.dcc
Class ListenDCC

java.lang.Object
  extended by rero.dcc.GenericDCC
      extended by rero.dcc.ListenDCC
All Implemented Interfaces:
java.lang.Runnable

public class ListenDCC
extends GenericDCC


Field Summary
protected static int offset
           
protected  java.net.ServerSocket server
           
protected static int timeout
           
 
Fields inherited from class rero.dcc.GenericDCC
fw, impl
 
Constructor Summary
ListenDCC()
           
 
Method Summary
 java.net.Socket establishConnection()
           
 int getListenerPort()
          instructs the class to listen for a connection on some port, returns the port as an integer.
static int getNextPort()
           
 
Methods inherited from class rero.dcc.GenericDCC
announceFramework, connect, getImplementation, getNickname, getState, getTypeOfDCC, run, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

protected java.net.ServerSocket server

offset

protected static int offset

timeout

protected static int timeout
Constructor Detail

ListenDCC

public ListenDCC()
Method Detail

getNextPort

public static int getNextPort()

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!@


establishConnection

public java.net.Socket establishConnection()
Specified by:
establishConnection in class GenericDCC