| Constructor and Description |
|---|
QSocketWrapper() |
QSocketWrapper(java.net.Socket s) |
| Modifier and Type | Method and Description |
|---|---|
int |
acceptInitialRead(byte[] buffer,
int offset,
int length)
Accepts a new socket.
|
void |
close()
Closes the underlying socket.
|
int |
getCipherBits()
Returns the bits in the socket.
|
java.lang.String |
getCipherSuite()
Returns the secure cipher algorithm.
|
java.security.cert.X509Certificate |
getClientCertificate()
Returns the client certificate.
|
java.security.cert.X509Certificate[] |
getClientCertificates()
Returns the client certificate.
|
java.net.InetAddress |
getLocalAddress()
Returns the server inet address that accepted the request.
|
int |
getLocalPort()
Returns the server port that accepted the request.
|
java.net.InetAddress |
getRemoteAddress()
Returns the remote client's inet address.
|
int |
getRemotePort()
Returns the remote client's port.
|
java.nio.channels.SelectableChannel |
getSelectableChannel()
Returns the selectable channel.
|
java.net.Socket |
getSocket() |
StreamImpl |
getStream()
Returns the socket's input stream.
|
long |
getTotalReadBytes()
Returns the total number of bytes read from the socket connection.
|
long |
getTotalWriteBytes()
Returns the total number of bytes written to the socket connection.
|
void |
init(java.net.Socket s) |
boolean |
isClosed()
Returns true for closes.
|
boolean |
isSecure()
Returns true if the connection is secure.
|
void |
resetTotalBytes() |
void |
setReadTimeout(int ms)
Sets the socket timeout.
|
void |
setSocket(java.net.Socket s) |
void |
setSoTimeout(int ms) |
void |
setTcpNoDelay(boolean isNoDelay) |
java.lang.String |
toString() |
closeWrite, forceShutdown, getLocalHost, getRemoteAddress, getRemoteHost, getRemoteIP, isEof, setRequestExpireTimepublic QSocketWrapper()
public QSocketWrapper(java.net.Socket s)
public void init(java.net.Socket s)
public int acceptInitialRead(byte[] buffer,
int offset,
int length)
throws java.io.IOException
acceptInitialRead in class QSocketjava.io.IOExceptionpublic void setReadTimeout(int ms)
throws java.io.IOException
java.io.IOExceptionpublic void setSoTimeout(int ms)
throws java.net.SocketException
setSoTimeout in class QSocketjava.net.SocketExceptionpublic void setTcpNoDelay(boolean isNoDelay)
throws java.net.SocketException
setTcpNoDelay in class QSocketjava.net.SocketExceptionpublic java.net.InetAddress getLocalAddress()
getLocalAddress in class QSocketpublic int getLocalPort()
getLocalPort in class QSocketpublic java.net.InetAddress getRemoteAddress()
getRemoteAddress in class QSocketpublic int getRemotePort()
getRemotePort in class QSocketpublic boolean isSecure()
public java.lang.String getCipherSuite()
getCipherSuite in class QSocketpublic int getCipherBits()
getCipherBits in class QSocketpublic java.security.cert.X509Certificate getClientCertificate()
throws java.security.cert.CertificateException
getClientCertificate in class QSocketjava.security.cert.CertificateExceptionpublic java.security.cert.X509Certificate[] getClientCertificates()
throws java.security.cert.CertificateException
getClientCertificates in class QSocketjava.security.cert.CertificateExceptionpublic java.nio.channels.SelectableChannel getSelectableChannel()
getSelectableChannel in class QSocketpublic StreamImpl getStream() throws java.io.IOException
public void resetTotalBytes()
public long getTotalReadBytes()
QSocketgetTotalReadBytes in class QSocketpublic long getTotalWriteBytes()
QSocketgetTotalWriteBytes in class QSocketpublic void close()
throws java.io.IOException