Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.emory.mathcs.util.net.tunnel
Class TunnelSocket

    java.lang.Object
      java.net.Socket
          edu.emory.mathcs.util.net.tunnel.TunnelSocket

public class TunnelSocket
extends java.net.Socket

Version:
  1.0
Author:
  Dawid Kurzyniec
See Also:
  `TunnelServerSocket`

Constructor Summary
`TunnelSocket()`
`TunnelSocket(java.net.InetSocketAddress addr, int port)`
`TunnelSocket(java.net.Socket tunnel)`
`TunnelSocket(java.net.Socket tunnel, int port)`
`TunnelSocket(java.net.Socket tunnel, int port, int timeout)`
`TunnelSocket(java.net.Socket tunnel, TunnelSocketAddress addr)`
`TunnelSocket(TunnelSocketAddress addr)`

Method Summary
`void` | `bind(java.net.SocketAddress bindpoint)` Not supported.
`void` | `close()`
`void` | `connect(java.net.SocketAddress endpoint, int timeout)`
`java.net.InetAddress` | `getInetAddress()`
`java.io.InputStream` | `getInputStream()`
`boolean` | `getKeepAlive()`
`java.net.InetAddress` | `getLocalAddress()`
`int` | `getLocalPort()`
`java.net.SocketAddress` | `getLocalSocketAddress()` Returns an `SocketAddress` holding local port number, as obtained via `getLocalPort()`.
`boolean` | `getOOBInline()`
`java.io.OutputStream` | `getOutputStream()`
`int` | `getPort()`
`int` | `getReceiveBufferSize()`
`java.net.SocketAddress` | `getRemoteSocketAddress()` Returns server endpoint information as `InProcSocketAddress`.
`boolean` | `getReuseAddress()`
`int` | `getSendBufferSize()`
`int` | `getSoLinger()`
`int` | `getSoTimeout()`
`boolean` | `getTcpNoDelay()`
`int` | `getTrafficClass()`
`protected java.net.Socket` | `getTunnel()`
`boolean` | `isBound()`
`boolean` | `isClosed()`
`boolean` | `isConnected()`
`boolean` | `isInputShutdown()`
`boolean` | `isOutputShutdown()`
`void` | `sendUrgentData(int data)`
`void` | `setKeepAlive(boolean on)`
`void` | `setOOBInline(boolean on)`
`void` | `setReceiveBufferSize(int size)`
`void` | `setReuseAddress(boolean on)`
`void` | `setSendBufferSize(int size)`
`void` | `setSoLinger(boolean on, int linger)`
`void` | `setSoTimeout(int timeout)`
`void` | `setTcpNoDelay(boolean on)`
`void` | `setTrafficClass(int tc)`
`void` | `shutdownInput()`
`void` | `shutdownOutput()`
`java.lang.String` | `toString()`

Methods inherited from class java.net.Socket
`connect, getChannel, setSocketImplFactory`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TunnelSocket

    public TunnelSocket(java.net.Socket tunnel,
                        TunnelSocketAddress addr)
                 throws java.io.IOException

Throws:
  `java.io.IOException` - if I/O error occurs

### TunnelSocket

    public TunnelSocket(TunnelSocketAddress addr)
                 throws java.io.IOException

### TunnelSocket

    public TunnelSocket(java.net.InetSocketAddress addr,
                        int port)
                 throws java.io.IOException

### TunnelSocket

    public TunnelSocket(java.net.Socket tunnel)
                 throws java.io.IOException

### TunnelSocket

    public TunnelSocket()
                 throws java.io.IOException

### TunnelSocket

    public TunnelSocket(java.net.Socket tunnel,
                        int port)
                 throws java.io.IOException

### TunnelSocket

    public TunnelSocket(java.net.Socket tunnel,
                        int port,
                        int timeout)
                 throws java.io.IOException

Method Detail

### connect

    public void connect(java.net.SocketAddress endpoint,
                        int timeout)
                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### bind

    public void bind(java.net.SocketAddress bindpoint)
              throws java.io.IOException

  Not supported.

  Parameters:
    `bindpoint` -
  Throws:
    `java.io.IOException`

### getTunnel

    protected java.net.Socket getTunnel()

### getInetAddress

    public java.net.InetAddress getInetAddress()

### getLocalAddress

    public java.net.InetAddress getLocalAddress()

### getPort

    public int getPort()

### getLocalPort

    public int getLocalPort()

### getRemoteSocketAddress

    public java.net.SocketAddress getRemoteSocketAddress()

  Returns server endpoint information as `InProcSocketAddress`.

  Returns:
    server endpoint information

### getLocalSocketAddress

    public java.net.SocketAddress getLocalSocketAddress()

  Returns an `SocketAddress` holding local port number, as obtained via `getLocalPort()`.

  Returns:
    client endpoint information

### getInputStream

    public java.io.InputStream getInputStream()
                                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### getOutputStream

    public java.io.OutputStream getOutputStream()
                                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### setTcpNoDelay

    public void setTcpNoDelay(boolean on)
                       throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getTcpNoDelay

    public boolean getTcpNoDelay()
                          throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### setSoLinger

    public void setSoLinger(boolean on,
                            int linger)
                     throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getSoLinger

    public int getSoLinger()
                    throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### sendUrgentData

    public void sendUrgentData(int data)
                        throws java.io.IOException

  Throws:
    `java.io.IOException`

### setOOBInline

    public void setOOBInline(boolean on)
                      throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getOOBInline

    public boolean getOOBInline()
                         throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### setSoTimeout

    public void setSoTimeout(int timeout)
                      throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getSoTimeout

    public int getSoTimeout()
                     throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### setSendBufferSize

    public void setSendBufferSize(int size)
                           throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getSendBufferSize

    public int getSendBufferSize()
                          throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### setReceiveBufferSize

    public void setReceiveBufferSize(int size)
                              throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getReceiveBufferSize

    public int getReceiveBufferSize()
                             throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### setKeepAlive

    public void setKeepAlive(boolean on)
                      throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getKeepAlive

    public boolean getKeepAlive()
                         throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### setTrafficClass

    public void setTrafficClass(int tc)
                         throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getTrafficClass

    public int getTrafficClass()
                        throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### setReuseAddress

    public void setReuseAddress(boolean on)
                         throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### getReuseAddress

    public boolean getReuseAddress()
                            throws java.net.SocketException

  Throws:
    `java.net.SocketException`

### close

    public void close()
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### shutdownInput

    public void shutdownInput()
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### shutdownOutput

    public void shutdownOutput()
                        throws java.io.IOException

  Throws:
    `java.io.IOException`

### toString

    public java.lang.String toString()

### isConnected

    public boolean isConnected()

### isBound

    public boolean isBound()

### isClosed

    public boolean isClosed()

### isInputShutdown

    public boolean isInputShutdown()

### isOutputShutdown

    public boolean isOutputShutdown()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD