C# Class NetMQ.OutgoingSocketExtensions

This static class serves to provide extension methods for IOutgoingSocket.
Show file Open project: NetMQ/NetMQ3-x

Public Methods

Method Description
Send ( this socket, Msg &msg, bool more ) : void

Block until the message is can be sent.

The call blocks until the message can be sent and cannot be interrupted. Wether the message can be sent depends on the socket type.

SendFrame ( [ socket, [ data, bool more = false ) : void

Transmit a byte-array of data over this socket, block until frame is sent.

SendFrame ( [ socket, [ data, int length, bool more = false ) : void

Transmit a byte-array of data over this socket, block until frame is sent.

SendFrameEmpty ( [ socket, bool more = false ) : void

Transmit an empty frame over this socket, block until frame is sent.

SendMultipartBytes ( [ socket ) : void

Send multiple frames on socket, blocking until all frames are sent.

SendMultipartBytes ( [ socket, IEnumerable frames ) : void

Send multiple frames on socket, blocking until all frames are sent.

SendMultipartMessage ( [ socket, [ message ) : void

Send multiple message on socket, blocking until all entire message is sent.

SignalError ( [ socket ) : void

Transmit a specific status-signal over this socket that indicates there is an error.

SignalOK ( [ socket ) : void

Transmit a specific status-signal over this socket that indicates OK.

TrySendFrame ( [ socket, System.TimeSpan timeout, [ data, bool more = false ) : bool

Attempt to transmit a single frame on socket. If message cannot be sent within timeout, return false.

TrySendFrame ( [ socket, System.TimeSpan timeout, [ data, int length, bool more = false ) : bool

Attempt to transmit a single frame on socket. If message cannot be sent within timeout, return false.

TrySendFrame ( [ socket, [ data, bool more = false ) : bool

Attempt to transmit a single frame on socket. If message cannot be sent immediately, return false.

TrySendFrame ( [ socket, [ data, int length, bool more = false ) : bool

Attempt to transmit a single frame on socket. If message cannot be sent immediately, return false.

TrySendFrameEmpty ( [ socket, System.TimeSpan timeout, bool more = false ) : bool

Attempt to transmit an empty frame on socket. If message cannot be sent within timeout, return false.

TrySendFrameEmpty ( [ socket, bool more = false ) : bool

Attempt to transmit an empty frame on socket. If message cannot be sent immediately, return false.

TrySendMultipartBytes ( [ socket ) : bool

Attempt to transmit a mulitple frames on socket. If frames cannot be sent immediatly, return false.

TrySendMultipartBytes ( [ socket, IEnumerable frames ) : bool

Attempt to transmit a mulitple frames on socket. If frames cannot be sent immediatly, return false.

TrySendMultipartBytes ( [ socket, System.TimeSpan timeout ) : bool

Attempt to transmit a mulitple frames on socket. If frames cannot be sent within timeout, return false.

TrySendMultipartBytes ( [ socket, System.TimeSpan timeout, IEnumerable frames ) : bool

Attempt to transmit a mulitple frames on socket. If frames cannot be sent within timeout, return false.

TrySendMultipartMessage ( [ socket, System.TimeSpan timeout, [ message ) : bool

Attempt to transmit a mulitple message on socket. If message cannot be sent within timeout, return false.

TrySendMultipartMessage ( [ socket, [ message ) : bool

Attempt to transmit a mulitple message on socket. If frames cannot be sent immediatly, return false.

TrySignalError ( [ socket ) : bool

Attempt to transmit a specific status-signal over this socket that indicates there is an error. If signal cannot be sent immediately, return false.

TrySignalOK ( [ socket ) : bool

Attempt to transmit a specific status-signal over this socket that indicates OK. If signal cannot be sent immediately, return false.

Private Methods

Method Description
Send ( [ socket, [ data ) : void
Send ( [ socket, [ message, [ encoding, SendReceiveOptions options ) : void
Send ( [ socket, [ message, [ encoding, bool dontWait = false, bool sendMore = false ) : void
Send ( [ socket, [ message, bool dontWait = false, bool sendMore = false ) : void
Send ( [ socket, [ data, int length, SendReceiveOptions options ) : void
Send ( [ socket, [ data, int length, bool dontWait = false, bool sendMore = false ) : void
SendMessage ( [ socket, [ message, bool dontWait = false ) : void
SendMore ( [ socket, [ message, [ encoding, bool dontWait = false ) : IOutgoingSocket
SendMore ( [ socket, [ data, bool dontWait = false ) : IOutgoingSocket
SendMore ( [ socket, [ data, int length, bool dontWait = false ) : IOutgoingSocket
SendMoreFrame ( [ socket, [ data ) : IOutgoingSocket
SendMoreFrame ( [ socket, [ data, int length ) : IOutgoingSocket
SendMoreFrameEmpty ( [ socket ) : IOutgoingSocket
Signal ( [ socket, byte status ) : void

Transmit a status-signal over this socket.

TrySignal ( [ socket, byte status ) : bool

Attempt to transmit a status-signal over this socket. If signal cannot be sent immediately, return false.

Method Details

Send() public static method

Block until the message is can be sent.
The call blocks until the message can be sent and cannot be interrupted. Wether the message can be sent depends on the socket type.
public static Send ( this socket, Msg &msg, bool more ) : void
socket this The socket to send the message on.
msg Msg An object with message's data to send.
more bool Indicate if another frame is expected after this frame
return void

SendFrame() public static method

Transmit a byte-array of data over this socket, block until frame is sent.
public static SendFrame ( [ socket, [ data, bool more = false ) : void
socket [ the IOutgoingSocket to transmit on
data [ the byte-array of data to send
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return void

SendFrame() public static method

Transmit a byte-array of data over this socket, block until frame is sent.
public static SendFrame ( [ socket, [ data, int length, bool more = false ) : void
socket [ the IOutgoingSocket to transmit on
data [ the byte-array of data to send
length int the number of bytes to send from .
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return void

SendFrameEmpty() public static method

Transmit an empty frame over this socket, block until frame is sent.
public static SendFrameEmpty ( [ socket, bool more = false ) : void
socket [ the IOutgoingSocket to transmit on
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return void

SendMultipartBytes() public static method

Send multiple frames on socket, blocking until all frames are sent.
public static SendMultipartBytes ( [ socket ) : void
socket [ the IOutgoingSocket to transmit on
return void

SendMultipartBytes() public static method

Send multiple frames on socket, blocking until all frames are sent.
public static SendMultipartBytes ( [ socket, IEnumerable frames ) : void
socket [ the IOutgoingSocket to transmit on
frames IEnumerable frames to transmit
return void

SendMultipartMessage() public static method

Send multiple message on socket, blocking until all entire message is sent.
public static SendMultipartMessage ( [ socket, [ message ) : void
socket [ the IOutgoingSocket to transmit on
message [ message to transmit
return void

SignalError() public static method

Transmit a specific status-signal over this socket that indicates there is an error.
public static SignalError ( [ socket ) : void
socket [ the IOutgoingSocket to transmit on
return void

SignalOK() public static method

Transmit a specific status-signal over this socket that indicates OK.
public static SignalOK ( [ socket ) : void
socket [ the IOutgoingSocket to transmit on
return void

TrySendFrame() public static method

Attempt to transmit a single frame on socket. If message cannot be sent within timeout, return false.
public static TrySendFrame ( [ socket, System.TimeSpan timeout, [ data, bool more = false ) : bool
socket [ the IOutgoingSocket to transmit on
timeout System.TimeSpan The maximum period of time to try to send a message.
data [ the byte-array of data to send
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return bool

TrySendFrame() public static method

Attempt to transmit a single frame on socket. If message cannot be sent within timeout, return false.
public static TrySendFrame ( [ socket, System.TimeSpan timeout, [ data, int length, bool more = false ) : bool
socket [ the IOutgoingSocket to transmit on
timeout System.TimeSpan The maximum period of time to try to send a message.
data [ the byte-array of data to send
length int the number of bytes to send from .
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return bool

TrySendFrame() public static method

Attempt to transmit a single frame on socket. If message cannot be sent immediately, return false.
public static TrySendFrame ( [ socket, [ data, bool more = false ) : bool
socket [ the IOutgoingSocket to transmit on
data [ the byte-array of data to send
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return bool

TrySendFrame() public static method

Attempt to transmit a single frame on socket. If message cannot be sent immediately, return false.
public static TrySendFrame ( [ socket, [ data, int length, bool more = false ) : bool
socket [ the IOutgoingSocket to transmit on
data [ the byte-array of data to send
length int the number of bytes to send from .
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return bool

TrySendFrameEmpty() public static method

Attempt to transmit an empty frame on socket. If message cannot be sent within timeout, return false.
public static TrySendFrameEmpty ( [ socket, System.TimeSpan timeout, bool more = false ) : bool
socket [ the IOutgoingSocket to transmit on
timeout System.TimeSpan The maximum period of time to try to send a message.
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return bool

TrySendFrameEmpty() public static method

Attempt to transmit an empty frame on socket. If message cannot be sent immediately, return false.
public static TrySendFrameEmpty ( [ socket, bool more = false ) : bool
socket [ the IOutgoingSocket to transmit on
more bool set this flag to true to signal that you will be immediately sending another frame (optional: default is false)
return bool

TrySendMultipartBytes() public static method

Attempt to transmit a mulitple frames on socket. If frames cannot be sent immediatly, return false.
public static TrySendMultipartBytes ( [ socket ) : bool
socket [ the IOutgoingSocket to transmit on
return bool

TrySendMultipartBytes() public static method

Attempt to transmit a mulitple frames on socket. If frames cannot be sent immediatly, return false.
public static TrySendMultipartBytes ( [ socket, IEnumerable frames ) : bool
socket [ the IOutgoingSocket to transmit on
frames IEnumerable frames to transmit
return bool

TrySendMultipartBytes() public static method

Attempt to transmit a mulitple frames on socket. If frames cannot be sent within timeout, return false.
public static TrySendMultipartBytes ( [ socket, System.TimeSpan timeout ) : bool
socket [ the IOutgoingSocket to transmit on
timeout System.TimeSpan The maximum period of time to try to send a message.
return bool

TrySendMultipartBytes() public static method

Attempt to transmit a mulitple frames on socket. If frames cannot be sent within timeout, return false.
public static TrySendMultipartBytes ( [ socket, System.TimeSpan timeout, IEnumerable frames ) : bool
socket [ the IOutgoingSocket to transmit on
timeout System.TimeSpan The maximum period of time to try to send a message.
frames IEnumerable frames to transmit
return bool

TrySendMultipartMessage() public static method

Attempt to transmit a mulitple message on socket. If message cannot be sent within timeout, return false.
public static TrySendMultipartMessage ( [ socket, System.TimeSpan timeout, [ message ) : bool
socket [ the IOutgoingSocket to transmit on
timeout System.TimeSpan The maximum period of time to try to send a message.
message [ message to transmit
return bool

TrySendMultipartMessage() public static method

Attempt to transmit a mulitple message on socket. If frames cannot be sent immediatly, return false.
public static TrySendMultipartMessage ( [ socket, [ message ) : bool
socket [ the IOutgoingSocket to transmit on
message [ message to transmit
return bool

TrySignalError() public static method

Attempt to transmit a specific status-signal over this socket that indicates there is an error. If signal cannot be sent immediately, return false.
public static TrySignalError ( [ socket ) : bool
socket [ the IOutgoingSocket to transmit on
return bool

TrySignalOK() public static method

Attempt to transmit a specific status-signal over this socket that indicates OK. If signal cannot be sent immediately, return false.
public static TrySignalOK ( [ socket ) : bool
socket [ the IOutgoingSocket to transmit on
return bool