C# 클래스 Examples.ClientSendingMessages

This is a simple example of a client that uses the 'Messaging' feature to send messages on a topic path. To send messages on a topic path, the client session requires the TopicPermission.SEND_TO_MESSAGE_HANDLER permission.
파일 보기 프로젝트 열기: pushtechnology/diffusion-examples

공개 메소드들

메소드 설명
ClientSendingMessages ( ) : System.Collections.Generic

Constructs a message sending application.

Close ( ) : void

Close the session.

Send ( string topicPath, string message, ISendCallback callback ) : void

Sends a simple string message to a specified topic path. There will be no context with the message so callback will be directed to the 'no context' callback.

Send ( string topicPath, string message, string context, ISendContextCallback callback ) : void

Sends a simple string message to a specified topic path with context string. The callback will be directed to the contextual callback with the string provided.

SendWithHeaders ( string topicPath, string message, List headers, ISendCallback callback ) : void

Sends a string message to a specified topic with headers. There will be no context with the message so callback will be directed to the 'no context' callback.

메소드 상세

ClientSendingMessages() 공개 메소드

Constructs a message sending application.
public ClientSendingMessages ( ) : System.Collections.Generic
리턴 System.Collections.Generic

Close() 공개 메소드

Close the session.
public Close ( ) : void
리턴 void

Send() 공개 메소드

Sends a simple string message to a specified topic path. There will be no context with the message so callback will be directed to the 'no context' callback.
public Send ( string topicPath, string message, ISendCallback callback ) : void
topicPath string The topic path.
message string The message to send.
callback ISendCallback Notifies that the message was sent.
리턴 void

Send() 공개 메소드

Sends a simple string message to a specified topic path with context string. The callback will be directed to the contextual callback with the string provided.
public Send ( string topicPath, string message, string context, ISendContextCallback callback ) : void
topicPath string
message string
context string
callback ISendContextCallback
리턴 void

SendWithHeaders() 공개 메소드

Sends a string message to a specified topic with headers. There will be no context with the message so callback will be directed to the 'no context' callback.
public SendWithHeaders ( string topicPath, string message, List headers, ISendCallback callback ) : void
topicPath string The topic path.
message string The message to send.
headers List The headers to send with the message.
callback ISendCallback Notifies that the message was sent.
리턴 void