Property | Type | Description | |
---|---|---|---|
AddEndpoint | void | ||
AttachPipe | void | ||
CheckContextTerminated | void | ||
CheckDestroy | void | ||
CheckProtocol | void | ||
Create | |||
DecodeAddress | void | ||
ExtractFlags | void | ||
GetTypeString | string | ||
MonitorEvent | void | ||
ProcessCommands | void | ||
StartReaping | void | ||
StopMonitor | void |
Method | Description | |
---|---|---|
Bind ( [ addr ) : void |
Bind this socket to the given address. The supported protocols are "inproc", "ipc", "tcp", "pgm", and "epgm". If the protocol is either "pgm" or "epgm", then this socket must be of type Pub, Sub, XPub, or XSub. If the protocol is "inproc", you cannot bind to the same address more than once. |
|
BindRandomPort ( [ addr ) : int |
Bind the specified TCP address to an available port, assigned by the operating system.
|
|
CheckDisposed ( ) : void |
Throw ObjectDisposedException if this socket is already disposed.
|
|
Close ( ) : void |
Close this socket. Mark it as disposed, and send ownership of it to the reaper thread to attend to the rest of it's shutdown process.
|
|
Connect ( [ addr ) : void |
Connect this socket to the given address. The supported protocols are "inproc", "ipc", "tcp", "pgm", and "epgm". If the protocol is either "pgm" or "epgm", then this socket must be of type Pub, Sub, XPub, or XSub. |
|
Destroy ( ) : void |
Destroy this socket - which means to stop monitoring the queue for messages. This simply calls StopMonitor, and then verifies that the destroyed-flag is set.
|
|
EventAcceptFailed ( [ addr, ErrorCode errno ) : void | ||
EventAccepted ( [ addr, [ ch ) : void | ||
EventBindFailed ( [ addr, ErrorCode errno ) : void | ||
EventCloseFailed ( [ addr, ErrorCode errno ) : void | ||
EventClosed ( [ addr, [ ch ) : void | ||
EventConnectDelayed ( [ addr, ErrorCode errno ) : void | ||
EventConnectRetried ( [ addr, int interval ) : void | ||
EventConnected ( [ addr, [ ch ) : void | ||
EventDisconnected ( [ addr, [ ch ) : void | ||
EventListening ( [ addr, [ ch ) : void | ||
GetSocketOption ( ZmqSocketOption option ) : int |
Return the integer-value of the specified option. If the ReceiveMore option is specified, then 1 is returned if it is true, 0 if it is false. If the Events option is specified, then process any outstanding commands, and return -1 if that throws a TerminatingException. then return an integer that is the bitwise-OR of the PollEvents.PollOut and PollEvents.PollIn flags. Otherwise, cast the specified option value to an integer and return it. |
|
GetSocketOptionX ( ZmqSocketOption option ) : object |
Return the value of the specified option as an Object. If the Handle option is specified, then return the handle of the contained mailbox. If the Events option is specified, then process any outstanding commands, and return -1 if that throws a TerminatingException. then return a PollEvents that is the bitwise-OR of the PollEvents.PollOut and PollEvents.PollIn flags. |
|
HasIn ( ) : bool |
These functions are used by the polling mechanism to determine which events are to be reported from this socket.
|
|
HasOut ( ) : bool |
These functions are used by the polling mechanism to determine which events are to be reported from this socket.
|
|
Hiccuped ( NetMQ.Core.Pipe pipe ) : void | ||
InEvent ( ) : void |
Handle input-ready events by receiving and processing any incoming commands.
|
|
Monitor ( [ addr, SocketEvents events ) : void |
Register the given events to monitor on the given endpoint.
|
|
OutEvent ( ) : void |
Handle output-ready events.
|
|
ReadActivated ( NetMQ.Core.Pipe pipe ) : void |
Indicate that the given pipe is now ready for reading. Pipe calls this on it's sink in response to ProcessActivateRead. When called upon an instance of SocketBase, this simply calls XReadActivated.
|
|
SetSocketOption ( ZmqSocketOption option, object optionValue ) : void |
Set the specified socket option.
|
|
Stop ( ) : void |
Interrupt a blocking call if the socket is stuck in one. This function can be called from a different thread!
|
|
TermEndpoint ( [ addr ) : void |
Disconnect from the given endpoint.
|
|
Terminated ( NetMQ.Core.Pipe pipe ) : void |
This gets called by ProcessPipeTermAck or XTerminated to respond to the termination of the given pipe.
|
|
TimerEvent ( int id ) : void |
In subclasses of SocketBase this is overridden, to handle the expiration of a timer.
|
|
ToString ( ) : string |
Override the ToString method in order to also show the socket-id.
|
|
TryRecv ( Msg &msg, System.TimeSpan timeout ) : bool |
Receive a frame into the given msg and return For timeout, there are three categories of value: |
|
TrySend ( Msg &msg, System.TimeSpan timeout, bool more ) : bool |
Transmit the given Msg across the message-queueing system.
|
|
WriteActivated ( NetMQ.Core.Pipe pipe ) : void |
When called upon an instance of SocketBase, this simply calls XWriteActivated.
|
Method | Description | |
---|---|---|
ProcessBind ( NetMQ.Core.Pipe pipe ) : void |
Process a Bind command by attaching the given Pipe.
|
|
ProcessDestroy ( ) : void |
Mark this socket as having been destroyed. Delay actual destruction of the socket.
|
|
ProcessStop ( ) : void |
Process a termination command on this socket, by stopping monitoring and marking this as terminated.
|
|
ProcessTerm ( int linger ) : void |
Process a termination request.
|
|
SocketBase ( [ parent, int threadId, int socketId ) : System |
Create a new SocketBase within the given Ctx, with the specified thread-id and socket-id.
|
|
XAttachPipe ( [ pipe, bool icanhasall ) : void |
Abstract method for attaching a given pipe to this socket. The concrete implementations are defined by the individual socket types.
|
|
XHasIn ( ) : bool |
This gets called when incoming messages are ready to be received. On SocketBase, this does nothing and simply returns false.
|
|
XHasOut ( ) : bool |
This gets called when outgoing messages are ready to be sent out. On SocketBase, this does nothing and simply returns false.
|
|
XHiccuped ( [ pipe ) : void | ||
XReadActivated ( [ pipe ) : void |
Indicate the given pipe as being ready for reading by this socket. This abstract method gets overridden by the different sockets to provide their own concrete implementation.
|
|
XRecv ( Msg &msg ) : bool |
Receive a message. The
|
|
XSend ( Msg &msg ) : bool |
Transmit the given message. The TrySend method calls this to do the actual sending. This abstract method gets overridden by the different socket types to provide their concrete implementation of sending messages.
|
|
XSetSocketOption ( ZmqSocketOption option, [ optionValue ) : bool |
The default implementation assumes there are no specific socket options for the particular socket type. If not so, overload this method.
|
|
XTerminated ( [ pipe ) : void |
Abstract method that gets called to signal that the given pipe is to be removed from this socket. The concrete implementations of SocketBase override this to provide their own implementation of how to terminate the pipe.
|
|
XWriteActivated ( [ pipe ) : void |
Indicate the given pipe as being ready for writing to by this socket. This abstract method gets called by the WriteActivated method and gets overridden by the different sockets to provide their own concrete implementation.
|
Method | Description | |
---|---|---|
AddEndpoint ( [ address, [ endpoint, NetMQ.Core.Pipe pipe ) : void |
Take ownership of the given endpoint and register it against the given address.
|
|
AttachPipe ( [ pipe, bool icanhasall = false ) : void |
Register the given pipe with this socket.
|
|
CheckContextTerminated ( ) : void |
Throw TerminatingException if the message-queueing system has started terminating.
|
|
CheckDestroy ( ) : void |
To be called after processing commands or invoking any command handlers explicitly. If required, it will deallocate the socket.
|
|
CheckProtocol ( [ protocol ) : void |
Check whether the transport protocol, as specified in connect or bind, is available and compatible with the socket type. The supported protocols are "inproc", "ipc", "tcp", "pgm", and "epgm". If the protocol is either "pgm" or "epgm", then this socket must be of type Pub, Sub, XPub, or XSub. |
|
Create ( ZmqSocketType type, [ parent, int threadId, int socketId ) : |
||
DecodeAddress ( [ addr, string &address, string &protocol ) : void |
Given a string containing an endpoint address like "tcp://127.0.0.1:5555, break-it-down into the address part ("127.0.0.1:5555") and the protocol part ("tcp").
|
|
ExtractFlags ( Msg &msg ) : void |
Moves the flags from the message to local variables, to be later retrieved by getsockopt.
|
|
GetTypeString ( ) : string | ||
MonitorEvent ( [ monitorEvent ) : void | ||
ProcessCommands ( int timeout, bool throttle ) : void |
Processes commands sent to this socket (if any). If timeout is
|
|
StartReaping ( [ poller ) : void |
Using this function reaper thread ask the socket to register with its poller.
|
|
StopMonitor ( ) : void |
If there is a monitor-socket, close it and set monitor-events to 0.
|
public Bind ( [ addr ) : void | ||
addr | [ | a string denoting the endpoint-address to bind to |
return | void |
public BindRandomPort ( [ addr ) : int | ||
addr | [ | a string denoting the endpoint to bind to |
return | int |
public Connect ( [ addr ) : void | ||
addr | [ | a string denoting the endpoint to connect to |
return | void |
public EventAcceptFailed ( [ addr, ErrorCode errno ) : void | ||
addr | [ | |
errno | ErrorCode | |
return | void |
public EventBindFailed ( [ addr, ErrorCode errno ) : void | ||
addr | [ | |
errno | ErrorCode | |
return | void |
public EventCloseFailed ( [ addr, ErrorCode errno ) : void | ||
addr | [ | |
errno | ErrorCode | |
return | void |
public EventConnectDelayed ( [ addr, ErrorCode errno ) : void | ||
addr | [ | |
errno | ErrorCode | |
return | void |
public EventConnectRetried ( [ addr, int interval ) : void | ||
addr | [ | |
interval | int | |
return | void |
public EventConnected ( [ addr, [ ch ) : void | ||
addr | [ | |
ch | [ | |
return | void |
public EventDisconnected ( [ addr, [ ch ) : void | ||
addr | [ | |
ch | [ | |
return | void |
public EventListening ( [ addr, [ ch ) : void | ||
addr | [ | |
ch | [ | |
return | void |
public GetSocketOption ( ZmqSocketOption option ) : int | ||
option | ZmqSocketOption | which option to get |
return | int |
public GetSocketOptionX ( ZmqSocketOption option ) : object | ||
option | ZmqSocketOption | which option to get |
return | object |
public Hiccuped ( NetMQ.Core.Pipe pipe ) : void | ||
pipe | NetMQ.Core.Pipe | |
return | void |
public Monitor ( [ addr, SocketEvents events ) : void | ||
addr | [ | a string denoting the endpoint to monitor. If this is null - monitoring is stopped. |
events | SocketEvents | the SocketEvent to monitor for |
return | void |
protected ProcessBind ( NetMQ.Core.Pipe pipe ) : void | ||
pipe | NetMQ.Core.Pipe | the Pipe to attach |
return | void |
protected ProcessTerm ( int linger ) : void | ||
linger | int | a time (in milliseconds) for this to linger before actually going away. -1 means infinite. |
return | void |
public ReadActivated ( NetMQ.Core.Pipe pipe ) : void | ||
pipe | NetMQ.Core.Pipe | the pipe to indicate is ready for reading |
return | void |
public SetSocketOption ( ZmqSocketOption option, object optionValue ) : void | ||
option | ZmqSocketOption | which option to set |
optionValue | object | the value to set the option to |
return | void |
protected SocketBase ( [ parent, int threadId, int socketId ) : System | ||
parent | [ | the Ctx context that this socket will live within |
threadId | int | the id of the thread upon which this socket will execute |
socketId | int | the integer id for the new socket |
return | System |
public TermEndpoint ( [ addr ) : void | ||
addr | [ | the endpoint to disconnect from |
return | void |
public Terminated ( NetMQ.Core.Pipe pipe ) : void | ||
pipe | NetMQ.Core.Pipe | the pipe that was terminated |
return | void |
public TimerEvent ( int id ) : void | ||
id | int | an integer used to identify the timer |
return | void |
public TryRecv ( Msg &msg, System.TimeSpan timeout ) : bool | ||
msg | Msg | the |
timeout | System.TimeSpan | this controls whether the call blocks, and for how long. |
return | bool |
public TrySend ( Msg &msg, System.TimeSpan timeout, bool more ) : bool | ||
msg | Msg | The |
timeout | System.TimeSpan | The timeout to wait before returning |
more | bool | Whether this message will contain another frame after this one. |
return | bool |
public WriteActivated ( NetMQ.Core.Pipe pipe ) : void | ||
pipe | NetMQ.Core.Pipe | the pipe to indicate is ready for writing |
return | void |
protected abstract XAttachPipe ( [ pipe, bool icanhasall ) : void | ||
pipe | [ | the Pipe to attach |
icanhasall | bool | if true - subscribe to all data on the pipe |
return | void |
protected XReadActivated ( [ pipe ) : void | ||
pipe | [ | the |
return | void |
protected XRecv ( Msg &msg ) : bool | ||
msg | Msg | the |
return | bool |
protected XSend ( Msg &msg ) : bool | ||
msg | Msg | the message to transmit |
return | bool |
protected XSetSocketOption ( ZmqSocketOption option, [ optionValue ) : bool | ||
option | ZmqSocketOption | a ZmqSocketOption specifying which option to set |
optionValue | [ | an Object that is the value to set the option to |
return | bool |
protected abstract XTerminated ( [ pipe ) : void | ||
pipe | [ | the Pipe that is being removed |
return | void |
protected XWriteActivated ( [ pipe ) : void | ||
pipe | [ | the |
return | void |