| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
_defaultPort_ |
protected InputStream |
_input_ |
protected boolean |
_isConnected_ |
protected boolean |
_keepalive_ |
protected OutputStream |
_output_ |
protected Socket |
_socket_ |
protected SocketFactory |
_socketFactory_ |
protected int |
_solinger_ |
protected boolean |
_tcpnodelay_ |
protected int |
_timeout_ |
protected int |
_trafficclass_ |
SOCKET_CLASS_01, SOCKET_CLASS_02, SOCKET_CLASS_03, SOCKET_CLASS_04, SOCKET_CONN_TIMEOUT, SOCKET_READ_TIMEOUT| 构造器和说明 |
|---|
TcpClient() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
_connectAction_() |
void |
connect(InetAddress host) |
void |
connect(InetAddress host,
int port) |
void |
connect(InetAddress host,
int port,
InetAddress localAddr,
int localPort) |
void |
connect(String hostname) |
void |
connect(String hostname,
int port) |
void |
connect(String hostname,
int port,
InetAddress localAddr,
int localPort) |
void |
disconn() |
int |
getDefaultPort() |
int |
getDefaultTimeout() |
boolean |
getKeepAlive() |
InetAddress |
getLocalAddress() |
int |
getLocalPort() |
InetAddress |
getRemoteAddress() |
int |
getRemotePort() |
int |
getSoLinger() |
int |
getSoTimeout() |
boolean |
getTcpNoDelay() |
int |
getTrafficClass() |
boolean |
isConnected() |
void |
setDefaultPort(int port) |
void |
setDefaultTimeout(int timeout) |
void |
setKeepAlive(boolean keepalive) |
void |
setSoLinger(int solinger) |
void |
setSoTimeout(int timeout) |
void |
setTcpNoDelay(boolean tcpnodelay) |
void |
setTrafficClass(int trafficclass) |
boolean |
verifyRemote(Socket socket) |
protected int _timeout_
protected boolean _keepalive_
protected int _trafficclass_
protected boolean _tcpnodelay_
protected int _solinger_
protected boolean _isConnected_
protected int _defaultPort_
protected InputStream _input_
protected OutputStream _output_
protected Socket _socket_
protected SocketFactory _socketFactory_
protected void _connectAction_()
throws IOException
IOExceptionpublic void connect(InetAddress host, int port) throws SocketException, IOException
public void connect(String hostname, int port) throws SocketException, IOException
public void connect(InetAddress host, int port, InetAddress localAddr, int localPort) throws SocketException, IOException
public void connect(String hostname, int port, InetAddress localAddr, int localPort) throws SocketException, IOException
public void connect(InetAddress host) throws SocketException, IOException
public void connect(String hostname) throws SocketException, IOException
public void disconn()
throws IOException
IOExceptionpublic boolean isConnected()
public void setDefaultPort(int port)
public int getDefaultPort()
public void setDefaultTimeout(int timeout)
public int getDefaultTimeout()
public void setKeepAlive(boolean keepalive)
public boolean getKeepAlive()
public void setTrafficClass(int trafficclass)
public int getTrafficClass()
public void setTcpNoDelay(boolean tcpnodelay)
public boolean getTcpNoDelay()
public void setSoLinger(int solinger)
public int getSoLinger()
public void setSoTimeout(int timeout)
throws SocketException
SocketExceptionpublic int getSoTimeout()
throws SocketException
SocketExceptionpublic int getLocalPort()
public InetAddress getLocalAddress()
public int getRemotePort()
public InetAddress getRemoteAddress()
public boolean verifyRemote(Socket socket)
Copyright (c) 2002-2020 Luther Inc.