com.ibm.etill.framework.io
Class ClientSocket

java.lang.Object
  |
  +--java.net.Socket
        |
        +--com.ibm.etill.framework.io.ClientSocket
Direct Known Subclasses:
TypicalClientSocket

public class ClientSocket
extends Socket

This class contains a single static method for a client program to use to connect to a target server TCP port possibly through a SOCKS server (using SOCKS version 4 protocol). This class DOES NOT support: 1) The SOCKS V4 extension for handling when you have a target hostname but can't get the IP address of the target host to connect to. 2) SOCKS V5 (any of it ...).

Since:
2.2
Author:
dj

Constructor Summary
ClientSocket()
          Class constructor that creates an unconnected client socket, which is very useful for subclasses.
ClientSocket(TcpipHost targetHost)
          Class constructor that takes a TcpipHost target.
ClientSocket(TcpipHost targetHost, TcpipHost socksHost)
          Class constructor that takes a TcpipHost target and a TcpipHost socks server.
 
Methods inherited from class java.net.Socket
close, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getOutputStream, getPort, getReceiveBufferSize, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, setKeepAlive, setReceiveBufferSize, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, shutdownInput, shutdownOutput, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClientSocket

public ClientSocket()
Class constructor that creates an unconnected client socket, which is very useful for subclasses.

ClientSocket

public ClientSocket(TcpipHost targetHost)
             throws IOException
Class constructor that takes a TcpipHost target.
Parameters:
targetHost - A client socket connection is created with a server using the specified TcpipHost.
Throws:
IOException - if the underlying socket can not be created.
SecurityException - if a security manager exists and the socket connection is not allowed.

ClientSocket

public ClientSocket(TcpipHost targetHost,
                    TcpipHost socksHost)
             throws IOException
Class constructor that takes a TcpipHost target and a TcpipHost socks server.
Parameters:
targetHost - the target of the TCP/IP socket connection
socksHost - the socks server TCP/IP host and port
Throws:
IOException - If an input or output exception occured reading or writing to socksHost or there is a protocol error communicating with socksHost
SecurityException - if a security manager exists and the socket connection to socksHost is not allowed.