java.net
public
interface
java.net.SocketOptions
Defines the protocol to get & set Socket options.
Known Indirect Subclasses
DatagramSocketImpl |
The abstract superclass of datagram & multicast socket implementations. |
SocketImpl |
The abstract superclass of all classes that implement streaming sockets. |
Summary
Details
Constants
public
static
final
int
IP_MULTICAST_IF
Constant Value:
16
(0x00000010)
public
static
final
int
IP_MULTICAST_IF2
Constant Value:
31
(0x0000001f)
public
static
final
int
IP_MULTICAST_LOOP
Constant Value:
18
(0x00000012)
public
static
final
int
IP_TOS
Constant Value:
3
(0x00000003)
public
static
final
int
SO_BINDADDR
Constant Value:
15
(0x0000000f)
public
static
final
int
SO_BROADCAST
Constant Value:
32
(0x00000020)
public
static
final
int
SO_KEEPALIVE
Constant Value:
8
(0x00000008)
public
static
final
int
SO_LINGER
Constant Value:
128
(0x00000080)
public
static
final
int
SO_OOBINLINE
Constant Value:
4099
(0x00001003)
public
static
final
int
SO_RCVBUF
Constant Value:
4098
(0x00001002)
public
static
final
int
SO_REUSEADDR
Constant Value:
4
(0x00000004)
public
static
final
int
SO_SNDBUF
Constant Value:
4097
(0x00001001)
public
static
final
int
SO_TIMEOUT
Timeout for blocking operation. The argument value is specified
in milliseconds.
Constant Value:
4102
(0x00001006)
public
static
final
int
TCP_NODELAY
Constant Value:
1
(0x00000001)
Public Methods
public
Object
getOption(int optID)
Answer the declared socket option.
Parameters
optID
| the option identifier |
public
void
setOption(int optID, Object val)
Set the declared socket option to the value.
Parameters
optID
| the option identifier |
val
| the option value to be set |