C# Class NetMQ.Poller

Inheritance: IDisposable
Afficher le fichier Open project: NetMQ/NetMQ3-x Class Usage Examples

Private Properties

Свойство Type Description
Cancel void
INetMQPoller void
INetMQPoller void
ISocketPollableCollection void
OnSocketEventsChanged void
PollWhile void
RebuildPollset void
Start void
Stop void
Stop void
TicklessTimer int

Méthodes publiques

Méthode Description
AddPollInSocket ( [ socket, [ callback ) : void

Add the given socket and Action to this Poller's collection of socket/actions.

AddSocket ( [ socket ) : void

Add the given socket to this Poller's list.

AddTimer ( [ timer ) : void

Add the given timer to this Poller's list.

Cancel ( ) : void

Cancel the poller job when PollTillCancelled is called

CancelAndJoin ( ) : void

Cancel the poller job when PollTillCancelled is called and wait for the PollTillCancelled to complete

ContainsSocket ( NetMQSocket socket ) : bool

Gets whether socket has been added to this Poller.

Dispose ( ) : void

Perform any freeing, releasing or resetting of contained resources. If this poller is already started, signal the polling thread to stop - and block to wait for it.

Calling this again after the first time, does nothing.

PollOnce ( ) : void

Poll one time.

PollTillCancelled ( ) : void

Poll till Cancel or CancelAndJoin is called. This is a blocking method.

PollTillCancelledNonBlocking ( ) : void

The non blocking version of PollTillCancelled, starting the PollTillCancelled on new thread. Will poll till Cancel or CancelAndJoin is called. This method is not blocking.

Poller ( ) : System

Create a new Poller object, with a default PollTimeout of 1 second.

RemoveAllSockets ( ) : void

Delete all sockets from this Poller's list.

RemoveAllTimers ( ) : void

Remove all timers from this Poller's list.

RemovePollInSocket ( [ socket ) : void

Delete the given socket from this Poller's collection of socket/actions.

RemoveSocket ( [ socket ) : void

Delete the given socket from this Poller's list.

RemoveTimer ( [ timer ) : void

Delete the given timer from this Poller's list.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Perform any freeing, releasing or resetting of contained resources. If this poller is already started, signal the polling thread to stop - and block to wait for it.

Private Methods

Méthode Description
Cancel ( bool waitForCloseToComplete ) : void

Signal this poller to stop, and return immediately if waitForCloseToComplete is false, block until the poller has actually stopped if waitForCloseToComplete is true.

INetMQPoller ( ) : void
INetMQPoller ( ISocketPollable socket ) : void
ISocketPollableCollection ( ISocketPollable socket ) : void
OnSocketEventsChanged ( object sender, NetMQSocketEventArgs e ) : void

Handle the EventsChanged event of any of the sockets contained within this Poller, by marking this poller as "dirty" in order to reset the poll events.

PollWhile ( [ condition ) : void

Poll as long as the given Func evaluates to true.

RebuildPollset ( ) : void
Start ( ) : void
Stop ( ) : void
Stop ( bool waitForCloseToComplete ) : void
TicklessTimer ( ) : int

Return the soonest timeout value of all the timers in the list, or zero to indicate any of them have already elapsed. The timeout is in milliseconds from now.

Method Details

AddPollInSocket() public méthode

Add the given socket and Action to this Poller's collection of socket/actions.
socket and callback must not be null. The socket must not have already been added to this poller. This poller must not have already been disposed.
public AddPollInSocket ( [ socket, [ callback ) : void
socket [ the Socket to add
callback [ the Action to add
Résultat void

AddSocket() public méthode

Add the given socket to this Poller's list.
socket must not be null. socket must not have already been added to this poller. This poller must not have already been disposed.
public AddSocket ( [ socket ) : void
socket [ the ISocketPollable to add to the list
Résultat void

AddTimer() public méthode

Add the given timer to this Poller's list.
timer must not be null. This poller must not have already been disposed.
public AddTimer ( [ timer ) : void
timer [ the NetMQTimer to add to the list
Résultat void

Cancel() public méthode

Cancel the poller job when PollTillCancelled is called
public Cancel ( ) : void
Résultat void

CancelAndJoin() public méthode

Cancel the poller job when PollTillCancelled is called and wait for the PollTillCancelled to complete
public CancelAndJoin ( ) : void
Résultat void

ContainsSocket() public méthode

Gets whether socket has been added to this Poller.
public ContainsSocket ( NetMQSocket socket ) : bool
socket NetMQSocket
Résultat bool

Dispose() public méthode

Perform any freeing, releasing or resetting of contained resources. If this poller is already started, signal the polling thread to stop - and block to wait for it.
Calling this again after the first time, does nothing.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Perform any freeing, releasing or resetting of contained resources. If this poller is already started, signal the polling thread to stop - and block to wait for it.
protected Dispose ( bool disposing ) : void
disposing bool true if releasing managed resources
Résultat void

PollOnce() public méthode

Poll one time.
public PollOnce ( ) : void
Résultat void

PollTillCancelled() public méthode

Poll till Cancel or CancelAndJoin is called. This is a blocking method.
public PollTillCancelled ( ) : void
Résultat void

PollTillCancelledNonBlocking() public méthode

The non blocking version of PollTillCancelled, starting the PollTillCancelled on new thread. Will poll till Cancel or CancelAndJoin is called. This method is not blocking.
public PollTillCancelledNonBlocking ( ) : void
Résultat void

Poller() public méthode

Create a new Poller object, with a default PollTimeout of 1 second.
public Poller ( ) : System
Résultat System

RemoveAllSockets() public méthode

Delete all sockets from this Poller's list.
This poller must not have already been disposed.
public RemoveAllSockets ( ) : void
Résultat void

RemoveAllTimers() public méthode

Remove all timers from this Poller's list.
This poller must not have already been disposed.
public RemoveAllTimers ( ) : void
Résultat void

RemovePollInSocket() public méthode

Delete the given socket from this Poller's collection of socket/actions.
socket must not be null. This poller must not have already been disposed.
public RemovePollInSocket ( [ socket ) : void
socket [ the Socket to remove
Résultat void

RemoveSocket() public méthode

Delete the given socket from this Poller's list.
socket must not be null. This poller must not have already been disposed.
public RemoveSocket ( [ socket ) : void
socket [ the ISocketPollable to remove from the list
Résultat void

RemoveTimer() public méthode

Delete the given timer from this Poller's list.
timer must not be null. This poller must not have already been disposed.
public RemoveTimer ( [ timer ) : void
timer [ the NetMQTimer to remove from the list
Résultat void