|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransportLayer
This class represents the transport layer for client side Socket or DatagramSocket.
Field Summary |
---|
Fields inherited from interface com.ireasoning.core.network.NetConst |
---|
TCP, UDP |
Method Summary | |
---|---|
void |
close()
|
java.lang.String |
getHostName()
|
int |
getPort()
|
int |
getReceiveBufferSize()
|
int |
getType()
Returns the type of transport layer. |
boolean |
isConnected()
|
void |
open(java.lang.String host,
int port,
java.net.InetAddress localAddr,
int localPort)
Creates a client-side socket and connects it to the specified port number on the named host. |
void |
open(java.lang.String host,
int port,
java.net.InetAddress localAddr,
int localPort,
int connectionTimeout)
Creates a client-side socket and connects it to the specified port number on the named host. |
int |
receive(TransportData data)
|
void |
send(java.lang.String str)
|
void |
send(TransportData data)
|
void |
setReceiveBufferSize(int size)
|
void |
setTimeout(int timeout)
|
void |
setTrafficClass(int tc)
Sets traffic class or type-of-service octet in the IP datagram header As the underlying network implementation may ignore this value applications should consider it a hint. |
Method Detail |
---|
void send(TransportData data) throws java.io.IOException
java.io.IOException
void send(java.lang.String str) throws java.io.IOException
java.io.IOException
int receive(TransportData data) throws java.io.IOException
java.io.IOException
void open(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException
host
- the host name.port
- the port number.
java.io.IOException
void open(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort, int connectionTimeout) throws java.io.IOException
host
- the host name.port
- the port number.
java.io.IOException
void close()
void setTimeout(int timeout) throws java.net.SocketException
java.net.SocketException
boolean isConnected()
void setReceiveBufferSize(int size)
int getReceiveBufferSize()
java.lang.String getHostName()
int getPort()
int getType()
void setTrafficClass(int tc) throws java.net.SocketException