|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsquint.TCPPort
public class TCPPort
A TCPPort is a class that provides access to a port through which connections can be made to a program acting as a server.
Constructor Summary | |
---|---|
TCPPort(int portNum)
Create a new TCPPort. |
Method Summary | |
---|---|
NetConnection |
acceptNetConnection()
Await a connection from a client. |
TCPConnection |
acceptTCPConnection()
Await a connection from a client. |
void |
addConnectionListener(ConnectionListener whoCares)
Add a connection listener to this TCPPort. |
void |
close()
Close the port |
int |
getLocalPort()
Determine the port number associated with this port |
java.lang.String |
toString()
Return a string description of the port |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TCPPort(int portNum)
portNum
- the desired port number (a random free port will be assigned if the
parameters value is 0)Method Detail |
---|
public void close()
public int getLocalPort()
public void addConnectionListener(ConnectionListener whoCares)
whoCares
- the object that should be notified when a connection is establishedpublic TCPConnection acceptTCPConnection()
public NetConnection acceptNetConnection()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |