C# Класс NetMQ.Poller

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Cancel void
INetMQPoller void
INetMQPoller void
ISocketPollableCollection void
OnSocketEventsChanged void
PollWhile void
RebuildPollset void
Start void
Stop void
Stop void
TicklessTimer int

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

AddPollInSocket() публичный Метод

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
Результат void

AddSocket() публичный Метод

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
Результат void

AddTimer() публичный Метод

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
Результат void

Cancel() публичный Метод

Cancel the poller job when PollTillCancelled is called
public Cancel ( ) : void
Результат void

CancelAndJoin() публичный Метод

Cancel the poller job when PollTillCancelled is called and wait for the PollTillCancelled to complete
public CancelAndJoin ( ) : void
Результат void

ContainsSocket() публичный Метод

Gets whether socket has been added to this Poller.
public ContainsSocket ( NetMQSocket socket ) : bool
socket NetMQSocket
Результат bool

Dispose() публичный Метод

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
Результат void

Dispose() защищенный Метод

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
Результат void

PollOnce() публичный Метод

Poll one time.
public PollOnce ( ) : void
Результат void

PollTillCancelled() публичный Метод

Poll till Cancel or CancelAndJoin is called. This is a blocking method.
public PollTillCancelled ( ) : void
Результат void

PollTillCancelledNonBlocking() публичный Метод

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
Результат void

Poller() публичный Метод

Create a new Poller object, with a default PollTimeout of 1 second.
public Poller ( ) : System
Результат System

RemoveAllSockets() публичный Метод

Delete all sockets from this Poller's list.
This poller must not have already been disposed.
public RemoveAllSockets ( ) : void
Результат void

RemoveAllTimers() публичный Метод

Remove all timers from this Poller's list.
This poller must not have already been disposed.
public RemoveAllTimers ( ) : void
Результат void

RemovePollInSocket() публичный Метод

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
Результат void

RemoveSocket() публичный Метод

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
Результат void

RemoveTimer() публичный Метод

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
Результат void