public enum SocketType extends Enum<SocketType>
| Enum Constant and Description |
|---|
DATAGRAM |
SERVER |
SOCKET |
UNIX |
UNKNOWN |
| Modifier and Type | Method and Description |
|---|---|
static SocketType |
forChannel(Channel channel) |
boolean |
getBroadcast(Channel channel) |
boolean |
getKeepAlive(Channel channel) |
SocketAddress |
getLocalSocketAddress(Channel channel) |
boolean |
getOOBInline(Channel channel) |
int |
getReceiveBufferSize(Channel channel) |
SocketAddress |
getRemoteSocketAddress(Channel channel) |
boolean |
getReuseAddress(Channel channel) |
int |
getSendBufferSize(Channel channel) |
int |
getSocketOption(Channel channel,
jnr.constants.platform.SocketOption option) |
jnr.constants.platform.Sock |
getSocketType() |
int |
getSoLinger(Channel channel) |
int |
getSoTimeout(Channel channel) |
boolean |
getTcpNoDelay(Channel channel) |
void |
setBroadcast(Channel channel,
boolean b) |
void |
setKeepAlive(Channel channel,
boolean b) |
void |
setOOBInline(Channel channel,
boolean b) |
void |
setReceiveBufferSize(Channel channel,
int i) |
void |
setReuseAddress(Channel channel,
boolean reuse) |
void |
setSendBufferSize(Channel channel,
int size) |
void |
setSocketOption(Channel channel,
jnr.constants.platform.SocketOption option,
int value) |
void |
setSoLinger(Channel channel,
boolean b,
int i) |
void |
setSoTimeout(Channel channel,
int timeout) |
void |
setTcpNoDelay(Channel channel,
boolean b) |
void |
shutdownInput(Channel channel) |
void |
shutdownOutput(Channel channel) |
static SocketType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SocketType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SocketType SOCKET
public static final SocketType SERVER
public static final SocketType DATAGRAM
public static final SocketType UNIX
public static final SocketType UNKNOWN
public static SocketType[] values()
for (SocketType c : SocketType.values()) System.out.println(c);
public static SocketType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static SocketType forChannel(Channel channel)
public int getSoTimeout(Channel channel) throws IOException
IOExceptionpublic void setSoTimeout(Channel channel, int timeout) throws IOException
IOExceptionpublic boolean getReuseAddress(Channel channel) throws IOException
IOExceptionpublic void setReuseAddress(Channel channel, boolean reuse) throws IOException
IOExceptionpublic int getSendBufferSize(Channel channel) throws IOException
IOExceptionpublic void setSendBufferSize(Channel channel, int size) throws IOException
IOExceptionpublic int getReceiveBufferSize(Channel channel) throws IOException
IOExceptionpublic void setReceiveBufferSize(Channel channel, int i) throws IOException
IOExceptionpublic boolean getOOBInline(Channel channel) throws IOException
IOExceptionpublic void setOOBInline(Channel channel, boolean b) throws IOException
IOExceptionpublic int getSoLinger(Channel channel) throws IOException
IOExceptionpublic void setSoLinger(Channel channel, boolean b, int i) throws IOException
IOExceptionpublic boolean getKeepAlive(Channel channel) throws IOException
IOExceptionpublic void setKeepAlive(Channel channel, boolean b) throws IOException
IOExceptionpublic boolean getTcpNoDelay(Channel channel) throws IOException
IOExceptionpublic void setTcpNoDelay(Channel channel, boolean b) throws IOException
IOExceptionpublic boolean getBroadcast(Channel channel) throws IOException
IOExceptionpublic void setBroadcast(Channel channel, boolean b) throws IOException
IOExceptionpublic void shutdownInput(Channel channel) throws IOException
IOExceptionpublic void shutdownOutput(Channel channel) throws IOException
IOExceptionpublic SocketAddress getRemoteSocketAddress(Channel channel)
public SocketAddress getLocalSocketAddress(Channel channel)
public jnr.constants.platform.Sock getSocketType()
public int getSocketOption(Channel channel, jnr.constants.platform.SocketOption option) throws IOException
IOExceptionpublic void setSocketOption(Channel channel, jnr.constants.platform.SocketOption option, int value) throws IOException
IOExceptionCopyright © 2001–2024 JRuby. All rights reserved.