|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmobnet.Socket
Socket.java MobNet implementation of java.net.Socket NOT FULLY IMPLEMENTED
| Constructor Summary | |
Socket(int port,
java.lang.String destIP)
Constructor for Socket class. |
|
Socket(int port,
java.lang.String destIP,
boolean returnsetup)
This constuctor is called by a server in order to set up a reciprical Socket to the client. |
|
| Method Summary | |
void |
close()
Close the Socket CURRENTLY THIS METHOD DOES NOTHING |
InputStream |
getInputStream()
Returns the InputStream bound to this Socket |
boolean |
getKeepAlive()
NOT IMPLEMENTED |
boolean |
getOOBInline()
NOT IMPLEMENTED |
OutputStream |
getOutputStream()
Returns the OutputStream bound to this Socket |
int |
getPort()
|
boolean |
getReuseAddress()
NOT FULLY IMPLEMENTED Tests if SO_REUSEADDR is enabled. |
int |
getSoLinger()
NOT FULLY IMPLEMENTED Returns setting for SO_LINGER. |
int |
getSoTimeout()
Returns setting for SO_TIMEOUT. |
java.lang.String |
getSrcIP()
|
void |
insert(Packet p)
This method is used by the Singleton Manager and indirectly the Dispatcher to insert a Packet into the Socket |
void |
run()
Socket implements runnable. |
void |
setReady()
Called by a ServerSocket when it has finished instantiating the reciprocal Socket to the client. |
void |
setSoTimeout(int timeout)
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Socket(int port,
java.lang.String destIP)
throws java.io.IOException
port - Port to which the Socket is to be bounddestIP - IP to which the IP is to be bound
public Socket(int port,
java.lang.String destIP,
boolean returnsetup)
throws java.io.IOException
port - The port to which the Socket is to be bounddestIP - The IP address to which the Socket is to be boundreturnsetup - Boolean to differentiate this constructor with the other
constructor. This constructor ensures that the Socket does not try and connect
to a Server, as this Socket will be connecting to a client which as already set up
a socket to the Server.| Method Detail |
public void setReady()
public int getPort()
public java.lang.String getSrcIP()
public InputStream getInputStream()
throws java.io.IOException
java.io.IOException
public OutputStream getOutputStream()
throws java.io.IOException
java.io.IOException
public void setSoTimeout(int timeout)
throws java.net.SocketException
timeout - timeout in milliseconds
java.net.SocketExceptionpublic void insert(Packet p)
p - The Packet to be insertedpublic void close()
public boolean getKeepAlive()
throws java.net.SocketException
java.net.SocketException
public boolean getOOBInline()
throws java.net.SocketException
java.net.SocketException
public boolean getReuseAddress()
throws java.net.SocketException
java.net.SocketException
public int getSoLinger()
throws java.net.SocketException
java.net.SocketException
public int getSoTimeout()
throws java.net.SocketException
java.net.SocketExceptionpublic void run()
run in interface java.lang.Runnable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||