Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.net

Interface SocketOptions

java.lang.Object
|
+--java.net.SocketOptions


public interface SocketOptions

This interface is used by SocketImpl and DatagramSocketImpl to implement options on sockets.

Since:Authors:

Method Summary

java.lang.ObjectgetOption(int option_id)

Returns the current setting of the specified option.
voidsetOption(int option_id, java.lang.Object val)

Sets the specified option on a socket to the passed in object.

Method Details

getOption

public Object getOption(int option_id)

Returns the current setting of the specified option. The Object returned will be an Integer for options that have integer values. For options that are set to on or off, a Boolean will be returned. The option_id is one of the defined constants in this interface.

Parameters:

Returns:

Throws:


setOption

public void setOption(int option_id, java.lang.Object val)

Sets the specified option on a socket to the passed in object. For options that take an integer argument, the passed in object is an Integer. For options that are set to on or off, the value passed will be a Boolean. The option_id parameter is one of the defined constants in this interface.

Parameters:

Throws: