|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.Acceptor
Listens on ports, accepts incoming connections, and dispatches threads to handle those connections. Currently supports Gnutella messaging, HTTP, and chat connections over TCP; more may be supported in the future.
This class has a special relationship with UDPService and should really be the only class that intializes it. See setListeningPort() for more info.
Constructor Summary | |
Acceptor()
|
Method Summary | |
boolean |
acceptedIncoming()
This method lets you know if this class has accepted an incoming connection at any point during the session. |
byte[] |
getAddress(boolean checkForce)
Returns this' address to use for ping replies, query replies, and pushes. |
int |
getPort(boolean checkForce)
Returns the port at which the Connection Manager listens for incoming connections |
boolean |
isBannedIP(java.lang.String ip)
Returns whether ip is a banned address. |
void |
run()
|
void |
setAddress(java.net.InetAddress address)
|
void |
setListeningPort(int port)
|
void |
start()
Launches the port monitoring thread, MulticastService, and UDPService. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Acceptor()
Method Detail |
public void setAddress(java.net.InetAddress address)
public void start()
public byte[] getAddress(boolean checkForce)
checkForce
- whether or not to check if the IP address is forced.
If false, the forced IP address will never be used.
If true, the forced IP address will only be used if one is set.public int getPort(boolean checkForce)
checkForce
- whether or not to check if the port is forced.
public void setListeningPort(int port) throws java.io.IOException
java.io.IOException
public boolean acceptedIncoming()
public void run()
run
in interface java.lang.Runnable
public boolean isBannedIP(java.lang.String ip)
ip
- an address in resolved dotted-quad format, e.g., 18.239.0.144
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |