C# 클래스 NetMQ.Sockets.SubscriberSocket

A SubscriberSocket is a NetMQSocket intended to be used as the "Sub" in the PubSub pattern. The intended usage is to receive messages from the publisher socket.
상속: NetMQSocket
파일 보기 프로젝트 열기: NetMQ/NetMQ3-x 1 사용 예제들

공개 메소드들

메소드 설명
Subscribe ( byte topic ) : void

Subscribe this socket to the given 'topic' - which means enable this socket to receive messages that begin with this array of bytes.

Subscribe ( string topic ) : void

Subscribe this socket to the given 'topic' - which means enable this socket to receive messages that begin with this string prefix. You can set topic to an empty string to subscribe to everything.

Subscribe ( string topic, Encoding encoding ) : void

Subscribe this socket to the given 'topic' - which means enable this socket to receive messages that begin with this string prefix, using the given Encoding. You can set topic to an empty string to subscribe to everything.

SubscribeToAnyTopic ( ) : void

Subscribe this socket to all topics - which means enable this socket to receive all messages regardless of what the string prefix is. This is the same as calling Subscribe with an empty-string for the topic.

SubscriberSocket ( string connectionString = null ) : System

Create a new SubscriberSocket and attach socket to zero or more endpoints.

TrySend ( Msg &msg, System.TimeSpan timeout, bool more ) : bool
Unsubscribe ( byte topic ) : void

Remove this socket's subscription to the given topic.

Unsubscribe ( string topic ) : void

Remove this socket's subscription to the given topic.

Unsubscribe ( string topic, Encoding encoding ) : void

Remove this socket's subscription to the given topic.

비공개 메소드들

메소드 설명
Send ( Msg &msg, SendReceiveOptions options ) : void
SubscriberSocket ( SocketBase socketHandle ) : System

Create a new SubscriberSocket based upon the given SocketBase.

메소드 상세

Subscribe() 공개 메소드

Subscribe this socket to the given 'topic' - which means enable this socket to receive messages that begin with this array of bytes.
public Subscribe ( byte topic ) : void
topic byte this specifies what byte-array prefix to subscribe to
리턴 void

Subscribe() 공개 메소드

Subscribe this socket to the given 'topic' - which means enable this socket to receive messages that begin with this string prefix. You can set topic to an empty string to subscribe to everything.
public Subscribe ( string topic ) : void
topic string this specifies what text-prefix to subscribe to, or may be an empty-string to specify ALL
리턴 void

Subscribe() 공개 메소드

Subscribe this socket to the given 'topic' - which means enable this socket to receive messages that begin with this string prefix, using the given Encoding. You can set topic to an empty string to subscribe to everything.
public Subscribe ( string topic, Encoding encoding ) : void
topic string this specifies what text-prefix to subscribe to, or may be an empty-string to specify ALL
encoding System.Text.Encoding the character-Encoding to use when converting the topic string internally into a byte-array
리턴 void

SubscribeToAnyTopic() 공개 메소드

Subscribe this socket to all topics - which means enable this socket to receive all messages regardless of what the string prefix is. This is the same as calling Subscribe with an empty-string for the topic.
public SubscribeToAnyTopic ( ) : void
리턴 void

SubscriberSocket() 공개 메소드

Create a new SubscriberSocket and attach socket to zero or more endpoints.
public SubscriberSocket ( string connectionString = null ) : System
connectionString string List of NetMQ endpoints, seperated by commas and prefixed by '@' (to bind the socket) or '>' (to connect the socket). /// Default action is connect (if endpoint doesn't start with '@' or '>')
리턴 System

TrySend() 공개 메소드

public TrySend ( Msg &msg, System.TimeSpan timeout, bool more ) : bool
msg Msg
timeout System.TimeSpan
more bool
리턴 bool

Unsubscribe() 공개 메소드

Remove this socket's subscription to the given topic.
public Unsubscribe ( byte topic ) : void
topic byte a byte-array denoting which the topic to stop receiving
리턴 void

Unsubscribe() 공개 메소드

Remove this socket's subscription to the given topic.
public Unsubscribe ( string topic ) : void
topic string a string denoting which the topic to stop receiving
리턴 void

Unsubscribe() 공개 메소드

Remove this socket's subscription to the given topic.
public Unsubscribe ( string topic, Encoding encoding ) : void
topic string a string denoting which the topic to stop receiving
encoding System.Text.Encoding the Encoding to use when converting the topic string internally into a byte-array
리턴 void