C# Class NetMQ.Core.Ctx

Objects of class Ctx are intended to encapsulate all of the global state associated with the NetMQ library. This contains the sockets, and manages interaction between them.
Internal analog of the public NetMQContext class.
Afficher le fichier Open project: NetMQ/NetMQ3-x Class Usage Examples

Méthodes publiques

Méthode Description
CheckDisposed ( ) : void

Throws ObjectDisposedException if this is already disposed.

DestroySocket ( [ socket ) : void

Destroy the given socket - which means to remove it from the list of active sockets, and add it to the list of unused sockets to be terminated.

If this was the last socket, then stop the reaper.

GetReaper ( ) : ZObject

Returns reaper thread object.

RegisterEndpoint ( [ address, [ endpoint ) : bool

Save the given address and Endpoint within our internal list. This is used for management of inproc endpoints.

SendCommand ( int threadId, [ command ) : void

Send a command to the given destination thread.

Terminate ( ) : void

This function is called when user invokes zmq_term. If there are no more sockets open it'll cause all the infrastructure to be shut down. If there are open sockets still, the deallocation happens after the last one is closed.

UnregisterEndpoint ( [ address, [ socket ) : bool

Un-register the given address/socket, by removing it from the contained list of endpoints.

UnregisterEndpoints ( [ socket ) : void

Remove from the list of endpoints, all endpoints that reference the given socket.

Private Methods

Méthode Description
ChooseIOThread ( long affinity ) : NetMQ.Core.IOThread
CreateSocket ( ZmqSocketType type ) : SocketBase
FindEndpoint ( [ addr ) : Endpoint

Method Details

CheckDisposed() public méthode

Throws ObjectDisposedException if this is already disposed.
This object has already been disposed.
public CheckDisposed ( ) : void
Résultat void

DestroySocket() public méthode

Destroy the given socket - which means to remove it from the list of active sockets, and add it to the list of unused sockets to be terminated.
If this was the last socket, then stop the reaper.
public DestroySocket ( [ socket ) : void
socket [ the socket to destroy
Résultat void

GetReaper() public méthode

Returns reaper thread object.
public GetReaper ( ) : ZObject
Résultat ZObject

RegisterEndpoint() public méthode

Save the given address and Endpoint within our internal list. This is used for management of inproc endpoints.
public RegisterEndpoint ( [ address, [ endpoint ) : bool
address [ the textual name to give this endpoint
endpoint [ the Endpoint to remember
Résultat bool

SendCommand() public méthode

Send a command to the given destination thread.
public SendCommand ( int threadId, [ command ) : void
threadId int
command [
Résultat void

Terminate() public méthode

This function is called when user invokes zmq_term. If there are no more sockets open it'll cause all the infrastructure to be shut down. If there are open sockets still, the deallocation happens after the last one is closed.
public Terminate ( ) : void
Résultat void

UnregisterEndpoint() public méthode

Un-register the given address/socket, by removing it from the contained list of endpoints.
public UnregisterEndpoint ( [ address, [ socket ) : bool
address [ the (string) address denoting the endpoint to unregister
socket [ the socket associated with that endpoint
Résultat bool

UnregisterEndpoints() public méthode

Remove from the list of endpoints, all endpoints that reference the given socket.
public UnregisterEndpoints ( [ socket ) : void
socket [ the socket to remove all references to
Résultat void