Class jls.net.Selector

This class represents a multiplexor of sockets. A selector allows to detect when I/O is ready for a set of sockets
Defined in: Selector.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a selector.
Method Summary
Method Attributes Method Name and Description
 
Closes this selector.
 
register(socket, key, mode)
Registers a socket in this selector.
 
Selects a set of keys whose corresponding channels are ready for I/O operations.
 
Removes a socket from this selector.
Class Detail
jls.net.Selector()
Creates a selector.
Method Detail
{jls.net.Selector} close()
Closes this selector.
Returns:
{jls.net.Selector} This selector.

{jls.net.Selector} register(socket, key, mode)
Registers a socket in this selector.
Parameters:
{jls.net.Socket} socket
The socket to register.
{Object} key
The selection key.
{Number} mode Optional
The interest set for this registration.
Returns:
{jls.net.Selector} This selector.

{Array} select()
Selects a set of keys whose corresponding channels are ready for I/O operations.
Returns:
{Array} The selector's selected-key set. The array contains an Objects for each selected key with the following properties: 'key': the registered key, 'inFlags': the registered interest set, 'outFlags': the selected insterest set.

{jls.net.Selector} unregister(key)
Removes a socket from this selector.
Parameters:
{Object} key
The selection key.
Returns:
{jls.net.Selector} This selector.

Documentation generated by JsDoc Toolkit 2.3.2 on Sat Jan 08 2011 02:00:14 GMT+0100 (CET)