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
IOException
public void setSoTimeout(Channel channel, int timeout) throws IOException
IOException
public boolean getReuseAddress(Channel channel) throws IOException
IOException
public void setReuseAddress(Channel channel, boolean reuse) throws IOException
IOException
public int getSendBufferSize(Channel channel) throws IOException
IOException
public void setSendBufferSize(Channel channel, int size) throws IOException
IOException
public int getReceiveBufferSize(Channel channel) throws IOException
IOException
public void setReceiveBufferSize(Channel channel, int i) throws IOException
IOException
public boolean getOOBInline(Channel channel) throws IOException
IOException
public void setOOBInline(Channel channel, boolean b) throws IOException
IOException
public int getSoLinger(Channel channel) throws IOException
IOException
public void setSoLinger(Channel channel, boolean b, int i) throws IOException
IOException
public boolean getKeepAlive(Channel channel) throws IOException
IOException
public void setKeepAlive(Channel channel, boolean b) throws IOException
IOException
public boolean getTcpNoDelay(Channel channel) throws IOException
IOException
public void setTcpNoDelay(Channel channel, boolean b) throws IOException
IOException
public boolean getBroadcast(Channel channel) throws IOException
IOException
public void setBroadcast(Channel channel, boolean b) throws IOException
IOException
public void shutdownInput(Channel channel) throws IOException
IOException
public void shutdownOutput(Channel channel) throws IOException
IOException
public 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
IOException
public void setSocketOption(Channel channel, jnr.constants.platform.SocketOption option, int value) throws IOException
IOException
Copyright © 2001–2015 JRuby. All rights reserved.