C# 클래스 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.
파일 보기 프로젝트 열기: NetMQ/NetMQ3-x 1 사용 예제들

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
ChooseIOThread ( long affinity ) : NetMQ.Core.IOThread
CreateSocket ( ZmqSocketType type ) : SocketBase
FindEndpoint ( [ addr ) : Endpoint

메소드 상세

CheckDisposed() 공개 메소드

Throws ObjectDisposedException if this is already disposed.
This object has already been disposed.
public CheckDisposed ( ) : void
리턴 void

DestroySocket() 공개 메소드

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
리턴 void

GetReaper() 공개 메소드

Returns reaper thread object.
public GetReaper ( ) : ZObject
리턴 ZObject

RegisterEndpoint() 공개 메소드

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
리턴 bool

SendCommand() 공개 메소드

Send a command to the given destination thread.
public SendCommand ( int threadId, [ command ) : void
threadId int
command [
리턴 void

Terminate() 공개 메소드

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
리턴 void

UnregisterEndpoint() 공개 메소드

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
리턴 bool

UnregisterEndpoints() 공개 메소드

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
리턴 void