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.IOException
public void setSoTimeout(java.nio.channels.Channel channel, int timeout) throws java.io.IOException
java.io.IOException
public boolean getReuseAddress(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setReuseAddress(java.nio.channels.Channel channel, boolean reuse) throws java.io.IOException
java.io.IOException
public int getSendBufferSize(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setSendBufferSize(java.nio.channels.Channel channel, int size) throws java.io.IOException
java.io.IOException
public int getReceiveBufferSize(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setReceiveBufferSize(java.nio.channels.Channel channel, int i) throws java.io.IOException
java.io.IOException
public boolean getOOBInline(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setOOBInline(java.nio.channels.Channel channel, boolean b) throws java.io.IOException
java.io.IOException
public int getSoLinger(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setSoLinger(java.nio.channels.Channel channel, boolean b, int i) throws java.io.IOException
java.io.IOException
public boolean getKeepAlive(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setKeepAlive(java.nio.channels.Channel channel, boolean b) throws java.io.IOException
java.io.IOException
public boolean getTcpNoDelay(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setTcpNoDelay(java.nio.channels.Channel channel, boolean b) throws java.io.IOException
java.io.IOException
public boolean getBroadcast(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void setBroadcast(java.nio.channels.Channel channel, boolean b) throws java.io.IOException
java.io.IOException
public void shutdownInput(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public void shutdownOutput(java.nio.channels.Channel channel) throws java.io.IOException
java.io.IOException
public 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.IOException
public void setSocketOption(java.nio.channels.Channel channel, jnr.constants.platform.SocketOption option, int value) throws java.io.IOException
java.io.IOException
Copyright © 2002-2009 JRuby Team. All Rights Reserved.