Class TCPObjectSocket

java.lang.Object
org.nustaq.net.TCPObjectSocket

public class TCPObjectSocket
extends java.lang.Object
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 Details

  • Constructor Details

    • TCPObjectSocket

      public TCPObjectSocket​(java.lang.String host, int port) throws java.io.IOException
      Throws:
      java.io.IOException
    • TCPObjectSocket

      public TCPObjectSocket​(java.lang.String host, int port, FSTConfiguration conf) throws java.io.IOException
      Throws:
      java.io.IOException
    • TCPObjectSocket

      public TCPObjectSocket​(java.net.Socket socket, FSTConfiguration conf) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • isStopped

      public boolean isStopped()
    • isClosed

      public boolean isClosed()
    • getIn

      public java.io.InputStream getIn()
      enables reading raw bytes from socket
      Returns:
    • readObject

      public java.lang.Object readObject() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • writeObject

      public void writeObject​(java.lang.Object toWrite) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • flush

      public void flush() throws java.io.IOException
      Throws:
      java.io.IOException
    • setLastError

      public void setLastError​(java.lang.Throwable ex)
    • getLastError

      public java.lang.Throwable getLastError()
    • close

      public void close() throws java.io.IOException
      Throws:
      java.io.IOException
    • getSocket

      public java.net.Socket getSocket()
    • getConf

      public FSTConfiguration getConf()
    • setConf

      public void setConf​(FSTConfiguration conf)