public final class ClientTSap extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
byte[] |
tSelLocal |
byte[] |
tSelRemote |
| 构造器和说明 |
|---|
ClientTSap()
Use this constructor to create a client TSAP that will start connections to remote TSAPs.
|
ClientTSap(SocketFactory socketFactory)
Use this constructor to create a client TSAP that will start connections to remote TSAPs.
|
| 限定符和类型 | 方法和说明 |
|---|---|
TConnection |
connectTo(InetAddress address,
int port)
Connect to a remote TSAP that is listening at the destination address.
|
TConnection |
connectTo(InetAddress address,
int port,
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(SocketFactory socketFactory) |
public ClientTSap()
public ClientTSap(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(InetAddress address, int port) throws IOException
address - remote IPport - remote portIOException - is thrown if connection was unsuccessful.public TConnection connectTo(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException
address - remote IPport - remote portlocalAddr - local IPlocalPort - local portIOException - is thrown if connection was unsuccessful.public void setSocketFactory(SocketFactory socketFactory)
Copyright © 2025. All rights reserved.