Interface StreamSocket

All Known Implementing Classes:
PlainSocket

public interface StreamSocket
Interface of all stream sockets
Version:
$Revision$
Author:
$author$
  • Method Details

    • close

      void close() throws IOException
      Close the socket
      Throws:
      IOException
    • isConnected

      boolean isConnected()
      Is the socket connected?
      Returns:
    • getInputStream

      InputStream getInputStream() throws IOException
      Get the socket's input stream
      Returns:
      stream
      Throws:
      IOException
    • setSoTimeout

      void setSoTimeout(int timeout) throws SocketException
      Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
      Parameters:
      timeout -
      Throws:
      SocketException
    • getSoTimeout

      int getSoTimeout() throws SocketException
      Returns setting for SO_TIMEOUT.
      Throws:
      SocketException
    • getOutputStream

      OutputStream getOutputStream() throws IOException
      Get the socket's output stream
      Returns:
      stream
      Throws:
      IOException
    • getLocalAddress

      InetAddress getLocalAddress()
      Gets the local address to which the socket is bound.
      Returns:
      the local address
    • getLocalPort

      int getLocalPort()
      Returns the local port to which this socket is bound.
      Returns:
      the local port
    • getInetAddress

      InetAddress getInetAddress()
      Returns the address to which the socket is connected.
      Returns:
      the remote IP address
    • getRemoteHost

      String getRemoteHost()
      Get the actual hostname
      Returns:
      remote hostname
    • setRemoteHost

      void setRemoteHost(String remoteHost)
      Set the remote hostname
      Parameters:
      remoteHost - remote hostname
    • getReceiveBufferSize

      int getReceiveBufferSize() throws SocketException
      Gets the value of SO_RCVBUF
      Throws:
      SocketException
    • setReceiveBufferSize

      void setReceiveBufferSize(int size) throws SocketException
      Sets the SO_RCVBUF option
      Throws:
      SocketException
    • setSendBufferSize

      void setSendBufferSize(int size) throws SocketException
      Sets the SO_SNDBUF option
      Throws:
      SocketException
    • getSendBufferSize

      int getSendBufferSize() throws SocketException
      Get value of the SO_SNDBUF option
      Throws:
      SocketException
    • isSecureMode

      boolean isSecureMode()
      Is this socket in secure mode?
      Returns:
      true if secure mode
    • getDetail

      String getDetail()
      Get details about the socket
      Returns: