Android
java.net
public interface

java.net.SocketOptions

java.net.SocketOptions

Defines the protocol to get & set Socket options.

Known Indirect Subclasses

Summary

Constants

      Value  
int  IP_MULTICAST_IF    16  0x00000010 
int  IP_MULTICAST_IF2    31  0x0000001f 
int  IP_MULTICAST_LOOP    18  0x00000012 
int  IP_TOS    0x00000003 
int  SO_BINDADDR    15  0x0000000f 
int  SO_BROADCAST    32  0x00000020 
int  SO_KEEPALIVE    0x00000008 
int  SO_LINGER    128  0x00000080 
int  SO_OOBINLINE    4099  0x00001003 
int  SO_RCVBUF    4098  0x00001002 
int  SO_REUSEADDR    0x00000004 
int  SO_SNDBUF    4097  0x00001001 
int  SO_TIMEOUT  Timeout for blocking operation.  4102  0x00001006 
int  TCP_NODELAY    0x00000001 

Public Methods

          Object  getOption(int optID)
Answer the declared socket option.
          void  setOption(int optID, Object val)
Set the declared socket option to the value.

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

Returns

  • Object the option value

Throws

SocketException thrown if an error occurs getting the option

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

Throws

SocketException thrown if an error occurs setting the option
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56