public class SocketConnection
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
SocketConnection() |
SocketConnection(java.net.Socket socket) |
SocketConnection(java.lang.String host,
int port) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
close() |
boolean |
connect() |
java.net.InetAddress |
getAddr() |
java.lang.String |
getHost() |
java.io.IOException |
getLastException() |
java.lang.String |
getLocalHostAddress() |
java.lang.String |
getLocalHostName() |
int |
getLocalPort() |
int |
getPort() |
java.lang.String |
getRemoteHostAddress() |
java.lang.String |
getRemoteHostName() |
int |
getRemotePort() |
java.net.Socket |
getSocket() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
outputError() |
void |
print(boolean b) |
void |
print(char c) |
void |
print(char[] s) |
void |
print(double d) |
void |
print(float f) |
void |
print(int i) |
void |
print(long l) |
void |
print(java.lang.Object o) |
void |
print(java.lang.String s) |
void |
println() |
void |
println(boolean x) |
void |
println(char x) |
void |
println(char[] x) |
void |
println(double x) |
void |
println(float x) |
void |
println(int x) |
void |
println(long x) |
void |
println(java.lang.Object x) |
void |
println(java.lang.String x) |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
java.lang.String |
readLine() |
void |
setSocketEventsCallback(ISocketEventsCallback callback) |
void |
setSocketOptionLinger(boolean enabled,
int linger) |
void |
write(char[] buf) |
void |
write(char[] buf,
int off,
int len) |
void |
write(int c) |
void |
write(java.lang.String s) |
void |
write(java.lang.String s,
int off,
int len) |
public SocketConnection()
public SocketConnection(java.lang.String host, int port)
public SocketConnection(java.net.Socket socket) throws java.io.IOException
java.io.IOException
public boolean connect() throws java.io.IOException
java.io.IOException
public void setSocketEventsCallback(ISocketEventsCallback callback)
public java.net.Socket getSocket()
public java.lang.String getLocalHostAddress()
public java.lang.String getLocalHostName()
public int getLocalPort()
public java.lang.String getRemoteHostAddress()
public java.lang.String getRemoteHostName()
public int getRemotePort()
public void setSocketOptionLinger(boolean enabled, int linger)
public void print(boolean b) throws java.io.IOException
java.io.IOException
public void print(char c) throws java.io.IOException
java.io.IOException
public void print(char[] s) throws java.io.IOException
java.io.IOException
public void print(double d) throws java.io.IOException
java.io.IOException
public void print(float f) throws java.io.IOException
java.io.IOException
public void print(int i) throws java.io.IOException
java.io.IOException
public void print(long l) throws java.io.IOException
java.io.IOException
public void print(java.lang.Object o) throws java.io.IOException
java.io.IOException
public void print(java.lang.String s) throws java.io.IOException
java.io.IOException
public void println() throws java.io.IOException
java.io.IOException
public void println(boolean x) throws java.io.IOException
java.io.IOException
public void println(char x) throws java.io.IOException
java.io.IOException
public void println(char[] x) throws java.io.IOException
java.io.IOException
public void println(double x) throws java.io.IOException
java.io.IOException
public void println(float x) throws java.io.IOException
java.io.IOException
public void println(int x) throws java.io.IOException
java.io.IOException
public void println(long x) throws java.io.IOException
java.io.IOException
public void println(java.lang.Object x) throws java.io.IOException
java.io.IOException
public void println(java.lang.String x) throws java.io.IOException
java.io.IOException
public void write(char[] buf) throws java.io.IOException
java.io.IOException
public void write(char[] buf, int off, int len) throws java.io.IOException
java.io.IOException
public void write(int c) throws java.io.IOException
java.io.IOException
public void write(java.lang.String s) throws java.io.IOException
java.io.IOException
public void write(java.lang.String s, int off, int len) throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
java.io.IOException
public java.lang.String readLine() throws java.io.IOException
java.io.IOException
public boolean isConnected()
public boolean isClosed()
public boolean close() throws java.io.IOException
java.io.IOException
public java.net.InetAddress getAddr()
public java.lang.String getHost()
public java.io.IOException getLastException()
public boolean outputError()
public int getPort()
public java.lang.Object clone()
clone
in class java.lang.Object