|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SocketInterface
Defines the interface of all socket entity implementations.
Nested Class Summary | |
---|---|
static interface |
SocketInterface.TcpServerSocketInterface
Defines the interface for TcpServerSocket specific implementation. |
static interface |
SocketInterface.TcpSocketInterface
Defines the interface for TcpSocket specific implementation. |
Method Summary | |
---|---|
void |
_jistPostInit()
Post-constructor call. |
void |
bind(java.net.SocketAddress bindpoint)
Binds the ServerSocket to a specific address (IP address and port number). |
void |
checkPacketandState(TransTcp.TcpMessage msg,
NetAddress src)
Check and process the incoming packet depending on current state of the socket. |
void |
close()
Closes this socket. |
java.net.InetAddress |
getInetAddress()
Returns the local address of this server socket/socket. |
int |
getLocalPort()
Returns the port on which this socket is listening. |
java.net.SocketAddress |
getLocalSocketAddress()
Returns the address of the endpoint this socket is bound to, or null if it is not bound yet. |
int |
getReceiveBufferSize()
Gets the value of the SO_RCVBUF option for this ServerSocket, that is the proposed buffer size that will be used for Sockets accepted from this ServerSocket. |
boolean |
getReuseAddress()
Tests if SO_REUSEADDR is enabled. |
int |
getSoTimeout()
Retrieve setting for SO_TIMEOUT. |
boolean |
isBound()
Returns the binding state of the ServerSocket. |
boolean |
isClosed()
Returns the closed state of the ServerSocket. |
void |
setReceiveBufferSize(int size)
Sets a default proposed value for the SO_RCVBUF option for sockets accepted from this ServerSocket. |
void |
setReuseAddress(boolean on)
Enable/disable the SO_REUSEADDR socket option. |
void |
setSoTimeout(int timeout)
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. |
void |
setTcpEntity(TransInterface.TransTcpInterface tcpEntity)
Sets the reference to the network layer. |
java.lang.String |
toString()
Returns the implementation address and implementation port of this socket as a String. |
Method Detail |
---|
void _jistPostInit() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.void setTcpEntity(TransInterface.TransTcpInterface tcpEntity)
tcpEntity
- entity reference to transport layervoid bind(java.net.SocketAddress bindpoint) throws JistAPI.Continuation
bindpoint
- The IP address & port number to bind to.
JistAPI.Continuation
- never; blocking event.void close()
java.net.InetAddress getInetAddress() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.int getLocalPort() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.java.net.SocketAddress getLocalSocketAddress() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.int getReceiveBufferSize() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.boolean getReuseAddress() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.int getSoTimeout() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.boolean isBound() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.boolean isClosed() throws JistAPI.Continuation
JistAPI.Continuation
- never; blocking event.void setReceiveBufferSize(int size)
size
- the size to which to set the receive buffer size.
This value must be greater than 0.void setReuseAddress(boolean on)
on
- whether to enable or disable the socket optionvoid setSoTimeout(int timeout)
timeout
- the specified timeout, in millisecondsjava.lang.String toString() throws JistAPI.Continuation
toString
in class java.lang.Object
JistAPI.Continuation
- never; blocking event.void checkPacketandState(TransTcp.TcpMessage msg, NetAddress src)
msg
- the incoming TCP messagesrc
- source of packet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |