|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmuc.jositransport.TConnection
public class TConnection
Constructor Summary | |
---|---|
protected |
TConnection(java.net.Socket socket,
int maxTPDUSizeParam,
int messageTimeout,
int messageFragmentTimeout)
|
Method Summary | |
---|---|
void |
close()
|
void |
disconnect()
This function sends a Disconnect Request but does not wait for a Disconnect Confirm. |
protected void |
listenForCR()
This function is called once a client has connected to the server. |
byte[] |
receive()
This function will throw an EOFException in case a Disconnect Request (DR) or ErrorPDU (ER) was received or the socket was simply closed. |
void |
send(byte[] tsdu,
int offset,
int length)
|
void |
send(java.util.List<byte[]> tsdus,
java.util.List<java.lang.Integer> offsets,
java.util.List<java.lang.Integer> lengths)
|
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. |
protected void |
startConnection()
Starts a connection, sends a CR, waits for a CC and throws an IOException if not successful |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TConnection(java.net.Socket socket, int maxTPDUSizeParam, int messageTimeout, int messageFragmentTimeout) throws java.io.IOException
java.io.IOException
Method Detail |
---|
protected void listenForCR() throws java.io.IOException
java.io.IOException
protected void startConnection() throws java.io.IOException
java.io.IOException
public void send(java.util.List<byte[]> tsdus, java.util.List<java.lang.Integer> offsets, java.util.List<java.lang.Integer> lengths) throws java.io.IOException
java.io.IOException
public void send(byte[] tsdu, int offset, int length) throws java.io.IOException
java.io.IOException
public void setMessageTimeout(int messageTimeout) throws java.net.SocketException
messageTimeout
- in milliseconds
java.net.SocketException
public void setMessageFragmentTimeout(int messageFragmentTimeout) throws java.net.SocketException
messageFragmentTimeout
- in milliseconds
java.net.SocketException
public byte[] receive() throws java.io.IOException
java.io.IOException
public void disconnect()
public void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |