Package 

Class IceTcpSocketWrapper

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void close() Closes this socket.
      InetAddress getLocalAddress() Get local address.
      int getLocalPort() Get local port.
      SocketAddress getLocalSocketAddress() Get socket address.
      Socket getTCPSocket() Returns Socket object if the delegate socket is a TCP one, null otherwise.
      DatagramSocket getUDPSocket() Returns DatagramSocket object if the delegate socket is a UDP one, null otherwise.
      void receive(DatagramPacket p) Receives a DatagramPacket from this socket.
      void send(DatagramPacket p) Sends a DatagramPacket from this socket It is a utility method to provide a common way to send for both UDP and TCP socket.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IceTcpSocketWrapper

        IceTcpSocketWrapper(Socket delegate)
        Constructor.
        Parameters:
        delegate - delegate Socket
    • Method Detail

      • close

         void close()

        Closes this socket.

      • getTCPSocket

         Socket getTCPSocket()

        Returns Socket object if the delegate socket is a TCP one, null otherwise.

      • receive

         void receive(DatagramPacket p)

        Receives a DatagramPacket from this socket. It is a utility method to provide a common way to receive for both UDP and TCP socket. If the underlying socket is a TCP one, it is still possible to get the InputStream and do stuff with it.

      • send

         void send(DatagramPacket p)

        Sends a DatagramPacket from this socket It is a utility method to provide a common way to send for both UDP and TCP socket. If the underlying socket is a TCP one, it is still possible to get the OutputStream and do stuff with it.