public class JniServerSocketImpl extends QServerSocket
Modifier and Type | Method and Description |
---|---|
boolean |
accept(QSocket socket)
Accepts a new connection from the socket.
|
void |
close()
Closes the socket.
|
static QServerSocket |
create(java.lang.String host,
int port) |
QSocket |
createSocket()
Factory method creating an instance socket.
|
void |
finalize() |
long |
getFd()
Returns the file descriptor to OpenSSLFactory.
|
static java.lang.String |
getInitMessage() |
java.net.InetAddress |
getLocalAddress() |
int |
getLocalPort() |
int |
getSystemFD() |
boolean |
isClosed() |
static boolean |
isEnabled() |
boolean |
isJni()
Returns true if this is a JNI socket, to distinguish between
file-descriptors we have extra control over.
|
boolean |
isJniValid() |
boolean |
isSendfileEnabled() |
static boolean |
isSendfileEnabledStatic() |
boolean |
isTcpCork()
Sets the connection tcp-keepalive delay.
|
static boolean |
isTcpCorkEnabled() |
boolean |
isTcpKeepalive()
Sets the connection tcp-keepalive delay.
|
boolean |
isTcpNoDelay()
Sets the connection tcp-no-delay.
|
void |
listen(int backlog)
Sets the socket's listen backlog.
|
static QServerSocket |
open(int fd,
int port) |
void |
setConnectionSocketTimeout(int ms)
Sets the connection read timeout.
|
boolean |
setSaveOnExec() |
void |
setSSL(boolean isSSL) |
void |
setTcpCork(boolean isEnable)
Sets the connection tcp-keepalive delay.
|
void |
setTcpKeepalive(boolean isEnable)
Sets the connection tcp-keepalive delay.
|
void |
setTcpNoDelay(boolean isEnable)
Sets the connection tcp-no-delay.
|
java.lang.String |
toString() |
getSelector
public static boolean isEnabled()
public static java.lang.String getInitMessage()
public static boolean isSendfileEnabledStatic()
public void setSSL(boolean isSSL)
public boolean isSendfileEnabled()
public static boolean isTcpCorkEnabled()
public long getFd()
public boolean isJni()
isJni
in class QServerSocket
public boolean isJniValid()
public boolean setSaveOnExec()
setSaveOnExec
in class QServerSocket
public int getSystemFD()
getSystemFD
in class QServerSocket
public void listen(int backlog)
listen
in class QServerSocket
public static QServerSocket create(java.lang.String host, int port) throws java.io.IOException
java.io.IOException
public static QServerSocket open(int fd, int port) throws java.io.IOException
java.io.IOException
public void setConnectionSocketTimeout(int ms)
setConnectionSocketTimeout
in class QServerSocket
public void setTcpNoDelay(boolean isEnable)
setTcpNoDelay
in class QServerSocket
public boolean isTcpNoDelay()
isTcpNoDelay
in class QServerSocket
public void setTcpKeepalive(boolean isEnable)
setTcpKeepalive
in class QServerSocket
public boolean isTcpKeepalive()
isTcpKeepalive
in class QServerSocket
public void setTcpCork(boolean isEnable)
setTcpCork
in class QServerSocket
public boolean isTcpCork()
isTcpCork
in class QServerSocket
public boolean accept(QSocket socket) throws java.io.IOException
accept
in class QServerSocket
socket
- the socket connection structurejava.io.IOException
public QSocket createSocket() throws java.io.IOException
createSocket
in class QServerSocket
java.io.IOException
public java.net.InetAddress getLocalAddress()
getLocalAddress
in class QServerSocket
public int getLocalPort()
getLocalPort
in class QServerSocket
public boolean isClosed()
isClosed
in class QServerSocket
public void close() throws java.io.IOException
close
in class QServerSocket
java.io.IOException
public java.lang.String toString()
toString
in class QServerSocket
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable