C# Class NetMQ.Zyre.ZreMsg

work with ZRE messages
Afficher le fichier Open project: NetMQ/Zyre Class Usage Examples

Méthodes publiques

Méthode Description
GetUuid ( byte buffer, int offset ) : System.Guid
Receive ( IReceivingSocket input ) : bool

Receive a ZreMsg from the socket. Message is ignored if the message signature doesn't start with %xAA %xA1 (returns false). It appears "real" input will always be a RouterSocket, but DealerSocket is used during unit testing by zeromq/zyre and by this implementation.

ReceiveNew ( NetMQ.Sockets.RouterSocket input, System.Guid &uuid ) : ZreMsg

Return a new ZreMsg based received from the input socket. Message is ignored if input is a RouterSocket and the message header doesn't meet the http://rfc.zeromq.org/spec:36 spec. Message is ignored if the message signature doesn't start with %xAA %xA1.

Send ( IOutgoingSocket output ) : bool

Send the ZreMsg to the socket. Warning re WHISPER and SHOUT: The 0MQ spec http://rfc.zeromq.org/spec:36 says "message content defined as one 0MQ frame. ZRE does not support multi-frame message contents." ...on the other hand, it appears that zeromq/zyre also supports multi-frame contents, as per the top of zyre.c This C# implementation allows multi-frame contents.

SendHello ( IOutgoingSocket socket, string endpoint, List groups, byte status, string name, string>.Dictionary headers ) : bool

Send a Hello message to the socket

SendJoin ( IOutgoingSocket socket, ushort sequence, string group, byte status ) : bool

Send a Join message to the socket

SendLeave ( IOutgoingSocket socket, ushort sequence, string group, byte status ) : bool

Send a Leave message to the socket

SendPing ( IOutgoingSocket socket, ushort sequence ) : bool

Send a Ping message to the socket

SendPingOk ( IOutgoingSocket socket, ushort sequence ) : bool

Send a PingOk message to the socket

SendShout ( IOutgoingSocket socket, ushort sequence, NetMQMessage content ) : bool

Send a Shout message to the socket Warning re WHISPER and SHOUT: The 0MQ spec http://rfc.zeromq.org/spec:36 says "message content defined as one 0MQ frame. ZRE does not support multi-frame message contents." ...on the other hand, it appears that zeromq/zyre also supports multi-frame contents, as per the top of zyre.c This C# implementation allows multi-frame contents.

SendWhisper ( IOutgoingSocket socket, ushort sequence, NetMQMessage content ) : bool

Send a Whisper message to the socket Warning re WHISPER and SHOUT: The 0MQ spec http://rfc.zeromq.org/spec:36 says "message content defined as one 0MQ frame. ZRE does not support multi-frame message contents." ...on the other hand, it appears that zeromq/zyre also supports multi-frame contents, as per the top of zyre.c This C# implementation allows multi-frame contents.

ToString ( ) : string
ZreMsg ( ) : System

Create a new ZreMsg

Private Methods

Méthode Description
GetLongString ( ) : string
GetNumber1 ( ) : byte
GetNumber2 ( ) : UInt16
GetNumber4 ( ) : UInt32
GetNumber8 ( ) : System.UInt64
GetOctets ( byte host, int size ) : void
GetString ( ) : string
PutLongString ( string host ) : void
PutNumber1 ( byte host ) : void
PutNumber2 ( UInt16 host ) : void
PutNumber4 ( UInt32 host ) : void
PutNumber8 ( System.UInt64 host ) : void
PutOctets ( byte host, int size ) : void
PutString ( string host ) : void

Method Details

GetUuid() public static méthode

public static GetUuid ( byte buffer, int offset ) : System.Guid
buffer byte
offset int
Résultat System.Guid

Receive() public méthode

Receive a ZreMsg from the socket. Message is ignored if the message signature doesn't start with %xAA %xA1 (returns false). It appears "real" input will always be a RouterSocket, but DealerSocket is used during unit testing by zeromq/zyre and by this implementation.
public Receive ( IReceivingSocket input ) : bool
input IReceivingSocket the socket
Résultat bool

ReceiveNew() public static méthode

Return a new ZreMsg based received from the input socket. Message is ignored if input is a RouterSocket and the message header doesn't meet the http://rfc.zeromq.org/spec:36 spec. Message is ignored if the message signature doesn't start with %xAA %xA1.
public static ReceiveNew ( NetMQ.Sockets.RouterSocket input, System.Guid &uuid ) : ZreMsg
input NetMQ.Sockets.RouterSocket the socket
uuid System.Guid The identity Guid received into the RoutingId, or Guid.Empty
Résultat ZreMsg

Send() public méthode

Send the ZreMsg to the socket. Warning re WHISPER and SHOUT: The 0MQ spec http://rfc.zeromq.org/spec:36 says "message content defined as one 0MQ frame. ZRE does not support multi-frame message contents." ...on the other hand, it appears that zeromq/zyre also supports multi-frame contents, as per the top of zyre.c This C# implementation allows multi-frame contents.
public Send ( IOutgoingSocket output ) : bool
output IOutgoingSocket
Résultat bool

SendHello() public static méthode

Send a Hello message to the socket
public static SendHello ( IOutgoingSocket socket, string endpoint, List groups, byte status, string name, string>.Dictionary headers ) : bool
socket IOutgoingSocket
endpoint string
groups List
status byte
name string
headers string>.Dictionary
Résultat bool

SendJoin() public static méthode

Send a Join message to the socket
public static SendJoin ( IOutgoingSocket socket, ushort sequence, string group, byte status ) : bool
socket IOutgoingSocket
sequence ushort
group string
status byte
Résultat bool

SendLeave() public static méthode

Send a Leave message to the socket
public static SendLeave ( IOutgoingSocket socket, ushort sequence, string group, byte status ) : bool
socket IOutgoingSocket
sequence ushort
group string
status byte
Résultat bool

SendPing() public static méthode

Send a Ping message to the socket
public static SendPing ( IOutgoingSocket socket, ushort sequence ) : bool
socket IOutgoingSocket
sequence ushort
Résultat bool

SendPingOk() public static méthode

Send a PingOk message to the socket
public static SendPingOk ( IOutgoingSocket socket, ushort sequence ) : bool
socket IOutgoingSocket
sequence ushort
Résultat bool

SendShout() public static méthode

Send a Shout message to the socket Warning re WHISPER and SHOUT: The 0MQ spec http://rfc.zeromq.org/spec:36 says "message content defined as one 0MQ frame. ZRE does not support multi-frame message contents." ...on the other hand, it appears that zeromq/zyre also supports multi-frame contents, as per the top of zyre.c This C# implementation allows multi-frame contents.
public static SendShout ( IOutgoingSocket socket, ushort sequence, NetMQMessage content ) : bool
socket IOutgoingSocket
sequence ushort
content NetMQMessage See warning above
Résultat bool

SendWhisper() public static méthode

Send a Whisper message to the socket Warning re WHISPER and SHOUT: The 0MQ spec http://rfc.zeromq.org/spec:36 says "message content defined as one 0MQ frame. ZRE does not support multi-frame message contents." ...on the other hand, it appears that zeromq/zyre also supports multi-frame contents, as per the top of zyre.c This C# implementation allows multi-frame contents.
public static SendWhisper ( IOutgoingSocket socket, ushort sequence, NetMQMessage content ) : bool
socket IOutgoingSocket
sequence ushort
content NetMQMessage See warning above
Résultat bool

ToString() public méthode

public ToString ( ) : string
Résultat string

ZreMsg() public méthode

Create a new ZreMsg
public ZreMsg ( ) : System
Résultat System