C# Class NetMQ.Core.Utils.Poller

Inheritance: PollerBase
Mostrar archivo Open project: NetMQ/NetMQ3-x Class Usage Examples

Public Methods

Method Description
AddHandle ( [ handle, [ events ) : void

Add a new PollSet containing the given Socket and IPollEvents at the next iteration through the loop, and also add the Socket to the list of those to check for errors.

Destroy ( ) : void

Unless the polling-loop is already stopped, tell it to stop at the end of the current polling iteration, and wait for that thread to finish.

Poller ( [ name ) : System

Create a new Poller object with the given name.

RemoveHandle ( [ handle ) : void

Remove the given Socket from this Poller.

SetPollIn ( Socket handle ) : void

Add the given Socket to the list to be checked for read-readiness at each poll-iteration.

Start ( ) : void

Begin running the polling-loop, on a background thread.

The name of that background-thread is the same as the name of this Poller object.

Stop ( ) : void

Signal that we want to stop the polling-loop. This method returns immediately - it does not wait for the polling thread to stop.

Private Methods

Method Description
Loop ( ) : void

This method is the polling-loop that is invoked on a background thread when Start is called. As long as Stop hasn't been called: execute the timers, and invoke the handler-methods on each of the saved PollSets.

Method Details

AddHandle() public method

Add a new PollSet containing the given Socket and IPollEvents at the next iteration through the loop, and also add the Socket to the list of those to check for errors.
public AddHandle ( [ handle, [ events ) : void
handle [ the Socket to add
events [ the IPollEvents to include in the new PollSet to add
return void

Destroy() public method

Unless the polling-loop is already stopped, tell it to stop at the end of the current polling iteration, and wait for that thread to finish.
public Destroy ( ) : void
return void

Poller() public method

Create a new Poller object with the given name.
public Poller ( [ name ) : System
name [ a name to assign to this Poller
return System

RemoveHandle() public method

Remove the given Socket from this Poller.
public RemoveHandle ( [ handle ) : void
handle [ the System.Net.Sockets.Socket to remove
return void

SetPollIn() public method

Add the given Socket to the list to be checked for read-readiness at each poll-iteration.
public SetPollIn ( Socket handle ) : void
handle System.Net.Sockets.Socket the Socket to add
return void

Start() public method

Begin running the polling-loop, on a background thread.
The name of that background-thread is the same as the name of this Poller object.
public Start ( ) : void
return void

Stop() public method

Signal that we want to stop the polling-loop. This method returns immediately - it does not wait for the polling thread to stop.
public Stop ( ) : void
return void