Top Description Fields Constructors Methods
org.jruby.ext.socket

public sealed Enum SocketType

extends Enum<SocketType>
Class Inheritance
Imports
jnr.constants.platform.Sock, .SocketOption, jnr.unixsocket.UnixSocketAddress, .UnixSocketChannel, java.io.File, .IOException, java.net.DatagramSocket, .ServerSocket, .Socket, .SocketAddress, java.nio.channels.Channel, .DatagramChannel, .ServerSocketChannel, .SocketChannel

Encapsulates behavior across the primary socket types Socket, ServerSocket, and Datagramsocket.

Field Summary

Modifier and TypeField and Description
public static final SocketType
public static final SocketType
private final Sock
public static final SocketType
public static final SocketType
public static final SocketType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static boolean
asBoolean(int value)

public static SocketType
public boolean
public boolean
public SocketAddress
public boolean
public int
public SocketAddress
public boolean
public int
public int
public Sock
public int
public int
public boolean
public void
setBroadcast(Channel channel, boolean b)

public void
setKeepAlive(Channel channel, boolean b)

public void
setOOBInline(Channel channel, boolean b)

public void
setReceiveBufferSize(Channel channel, int i)

public void
setReuseAddress(Channel channel, boolean reuse)

public void
setSendBufferSize(Channel channel, int size)

public void
setSocketOption(Channel channel, SocketOption option, int value)

public void
setSoLinger(Channel channel, boolean b, int i)

public void
setSoTimeout(Channel channel, int timeout)

public void
setTcpNoDelay(Channel channel, boolean b)

public void
public void
public static SocketType
public static SocketType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DATAGRAMback to summary
public static final SocketType DATAGRAM
SERVERback to summary
public static final SocketType SERVER
sockback to summary
private final Sock sock
SOCKETback to summary
public static final SocketType SOCKET
UNIXback to summary
public static final SocketType UNIX
UNKNOWNback to summary
public static final SocketType UNKNOWN

Constructor Detail

SocketTypeback to summary
private SocketType(Sock sock)

Method Detail

asBooleanback to summary
private static boolean asBoolean(int value)
forChannelback to summary
public static SocketType forChannel(Channel channel)
getBroadcastback to summary
public boolean getBroadcast(Channel channel) throws IOException
getKeepAliveback to summary
public boolean getKeepAlive(Channel channel) throws IOException
getLocalSocketAddressback to summary
public SocketAddress getLocalSocketAddress(Channel channel)
getOOBInlineback to summary
public boolean getOOBInline(Channel channel) throws IOException
getReceiveBufferSizeback to summary
public int getReceiveBufferSize(Channel channel) throws IOException
getRemoteSocketAddressback to summary
public SocketAddress getRemoteSocketAddress(Channel channel)
getReuseAddressback to summary
public boolean getReuseAddress(Channel channel) throws IOException
getSendBufferSizeback to summary
public int getSendBufferSize(Channel channel) throws IOException
getSocketOptionback to summary
public int getSocketOption(Channel channel, SocketOption option) throws IOException
getSocketTypeback to summary
public Sock getSocketType()
getSoLingerback to summary
public int getSoLinger(Channel channel) throws IOException
getSoTimeoutback to summary
public int getSoTimeout(Channel channel) throws IOException
getTcpNoDelayback to summary
public boolean getTcpNoDelay(Channel channel) throws IOException
setBroadcastback to summary
public void setBroadcast(Channel channel, boolean b) throws IOException
setKeepAliveback to summary
public void setKeepAlive(Channel channel, boolean b) throws IOException
setOOBInlineback to summary
public void setOOBInline(Channel channel, boolean b) throws IOException
setReceiveBufferSizeback to summary
public void setReceiveBufferSize(Channel channel, int i) throws IOException
setReuseAddressback to summary
public void setReuseAddress(Channel channel, boolean reuse) throws IOException
setSendBufferSizeback to summary
public void setSendBufferSize(Channel channel, int size) throws IOException
setSocketOptionback to summary
public void setSocketOption(Channel channel, SocketOption option, int value) throws IOException
setSoLingerback to summary
public void setSoLinger(Channel channel, boolean b, int i) throws IOException
setSoTimeoutback to summary
public void setSoTimeout(Channel channel, int timeout) throws IOException
setTcpNoDelayback to summary
public void setTcpNoDelay(Channel channel, boolean b) throws IOException
shutdownInputback to summary
public void shutdownInput(Channel channel) throws IOException
shutdownOutputback to summary
public void shutdownOutput(Channel channel) throws IOException
valueOfback to summary
public static SocketType valueOf(String name)
valuesback to summary
public static SocketType[] values()