public final class ClientTSap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
byte[] |
tSelLocal |
byte[] |
tSelRemote |
Constructor and Description |
---|
ClientTSap()
Use this constructor to create a client TSAP that will start connections to remote TSAPs.
|
ClientTSap(javax.net.SocketFactory socketFactory)
Use this constructor to create a client TSAP that will start connections to remote TSAPs.
|
Modifier and Type | Method and Description |
---|---|
TConnection |
connectTo(java.net.InetAddress address,
int port)
Connect to a remote TSAP that is listening at the destination address.
|
TConnection |
connectTo(java.net.InetAddress address,
int port,
java.net.InetAddress localAddr,
int localPort)
Connect to a remote TSAP that is listening at the destination address.
|
static int |
getMaxTPDUSize(int maxTPDUSizeParam)
Calculates and returns the maximum TPDUSize.
|
int |
getMaxTPDUSizeParam()
Get the maximum TPDU size parameter to be used by this TSAP
|
void |
setMaxTPDUSizeParam(int maxTPduSizeParam)
Set the maxTPDUSize.
|
void |
setMessageFragmentTimeout(int messageFragmentTimeout)
Set the TConnection timeout for receiving data once the beginning of a message has been
received.
|
void |
setMessageTimeout(int messageTimeout)
Set the TConnection timeout for waiting for the first byte of a new message.
|
void |
setSocketFactory(javax.net.SocketFactory socketFactory) |
public ClientTSap()
public ClientTSap(javax.net.SocketFactory socketFactory)
socketFactory
- the socket factory to create the underlying socketpublic static int getMaxTPDUSize(int maxTPDUSizeParam)
maxTPDUSizeParam
- the size parameterpublic void setMessageTimeout(int messageTimeout)
messageTimeout
- in millisecondspublic void setMessageFragmentTimeout(int messageFragmentTimeout)
messageFragmentTimeout
- in millisecondspublic int getMaxTPDUSizeParam()
public void setMaxTPDUSizeParam(int maxTPduSizeParam)
maxTPduSizeParam
- The maximum length is equal to 2^(maxTPduSizeParam) octets. Note that
the actual TSDU size that can be transfered is equal to TPduSize-3. Default is 65531 octets
(see RFC 1006), 7 <= maxTPduSizeParam <= 16, needs to be set before listening or
connectingpublic TConnection connectTo(java.net.InetAddress address, int port) throws java.io.IOException
address
- remote IPport
- remote portjava.io.IOException
- is thrown if connection was unsuccessful.public TConnection connectTo(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort) throws java.io.IOException
address
- remote IPport
- remote portlocalAddr
- local IPlocalPort
- local portjava.io.IOException
- is thrown if connection was unsuccessful.public void setSocketFactory(javax.net.SocketFactory socketFactory)