Package org.nustaq.net
Class TCPObjectSocket
java.lang.Object
org.nustaq.net.TCPObjectSocket
Created by ruedi on 22.08.14.
As socket allowing to send/receive serializable objects
see ./test/net for an example
Note that by providing a Json configuration, it can be used cross language
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTCPObjectSocket(String host, int port) TCPObjectSocket(String host, int port, FSTConfiguration conf) TCPObjectSocket(Socket socket, FSTConfiguration conf) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()getConf()getIn()enables reading raw bytes from socketbooleanisClosed()booleanvoidsetConf(FSTConfiguration conf) voidvoidwriteObject(Object toWrite)
-
Field Details
-
BUFFER_SIZE
public static int BUFFER_SIZE
-
-
Constructor Details
-
TCPObjectSocket
- Throws:
IOException
-
TCPObjectSocket
- Throws:
IOException
-
TCPObjectSocket
- Throws:
IOException
-
-
Method Details
-
isStopped
public boolean isStopped() -
isClosed
public boolean isClosed() -
getIn
enables reading raw bytes from socket- Returns:
-
readObject
- Throws:
Exception
-
writeObject
- Throws:
Exception
-
flush
- Throws:
IOException
-
setLastError
-
getLastError
-
close
- Throws:
IOException
-
getSocket
-
getConf
-
setConf
-