public enum SocketType extends java.lang.Enum<SocketType>
| Enum Constant and Description |
|---|
DATAGRAM |
SERVER |
SOCKET |
UNIX |
UNKNOWN |
| Modifier and Type | Method and Description |
|---|---|
static SocketType |
forChannel(java.nio.channels.Channel channel) |
boolean |
getBroadcast(java.nio.channels.Channel channel) |
boolean |
getKeepAlive(java.nio.channels.Channel channel) |
java.net.SocketAddress |
getLocalSocketAddress(java.nio.channels.Channel channel) |
boolean |
getOOBInline(java.nio.channels.Channel channel) |
int |
getReceiveBufferSize(java.nio.channels.Channel channel) |
java.net.SocketAddress |
getRemoteSocketAddress(java.nio.channels.Channel channel) |
boolean |
getReuseAddress(java.nio.channels.Channel channel) |
int |
getSendBufferSize(java.nio.channels.Channel channel) |
int |
getSocketOption(java.nio.channels.Channel channel,
jnr.constants.platform.SocketOption option) |
jnr.constants.platform.Sock |
getSocketType() |
int |
getSoLinger(java.nio.channels.Channel channel) |
int |
getSoTimeout(java.nio.channels.Channel channel) |
boolean |
getTcpNoDelay(java.nio.channels.Channel channel) |
void |
setBroadcast(java.nio.channels.Channel channel,
boolean b) |
void |
setKeepAlive(java.nio.channels.Channel channel,
boolean b) |
void |
setOOBInline(java.nio.channels.Channel channel,
boolean b) |
void |
setReceiveBufferSize(java.nio.channels.Channel channel,
int i) |
void |
setReuseAddress(java.nio.channels.Channel channel,
boolean reuse) |
void |
setSendBufferSize(java.nio.channels.Channel channel,
int size) |
void |
setSocketOption(java.nio.channels.Channel channel,
jnr.constants.platform.SocketOption option,
int value) |
void |
setSoLinger(java.nio.channels.Channel channel,
boolean b,
int i) |
void |
setSoTimeout(java.nio.channels.Channel channel,
int timeout) |
void |
setTcpNoDelay(java.nio.channels.Channel channel,
boolean b) |
void |
shutdownInput(java.nio.channels.Channel channel) |
void |
shutdownOutput(java.nio.channels.Channel channel) |
static SocketType |
valueOf(java.lang.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(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static SocketType forChannel(java.nio.channels.Channel channel)
public int getSoTimeout(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setSoTimeout(java.nio.channels.Channel channel,
int timeout)
throws java.io.IOException
java.io.IOExceptionpublic boolean getReuseAddress(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setReuseAddress(java.nio.channels.Channel channel,
boolean reuse)
throws java.io.IOException
java.io.IOExceptionpublic int getSendBufferSize(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setSendBufferSize(java.nio.channels.Channel channel,
int size)
throws java.io.IOException
java.io.IOExceptionpublic int getReceiveBufferSize(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setReceiveBufferSize(java.nio.channels.Channel channel,
int i)
throws java.io.IOException
java.io.IOExceptionpublic boolean getOOBInline(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setOOBInline(java.nio.channels.Channel channel,
boolean b)
throws java.io.IOException
java.io.IOExceptionpublic int getSoLinger(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setSoLinger(java.nio.channels.Channel channel,
boolean b,
int i)
throws java.io.IOException
java.io.IOExceptionpublic boolean getKeepAlive(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setKeepAlive(java.nio.channels.Channel channel,
boolean b)
throws java.io.IOException
java.io.IOExceptionpublic boolean getTcpNoDelay(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setTcpNoDelay(java.nio.channels.Channel channel,
boolean b)
throws java.io.IOException
java.io.IOExceptionpublic boolean getBroadcast(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void setBroadcast(java.nio.channels.Channel channel,
boolean b)
throws java.io.IOException
java.io.IOExceptionpublic void shutdownInput(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic void shutdownOutput(java.nio.channels.Channel channel)
throws java.io.IOException
java.io.IOExceptionpublic java.net.SocketAddress getRemoteSocketAddress(java.nio.channels.Channel channel)
public java.net.SocketAddress getLocalSocketAddress(java.nio.channels.Channel channel)
public jnr.constants.platform.Sock getSocketType()
public int getSocketOption(java.nio.channels.Channel channel,
jnr.constants.platform.SocketOption option)
throws java.io.IOException
java.io.IOExceptionpublic void setSocketOption(java.nio.channels.Channel channel,
jnr.constants.platform.SocketOption option,
int value)
throws java.io.IOException
java.io.IOExceptionCopyright © 2001-2020 JRuby. All Rights Reserved.