C-DEngine 5.105

TheCommRequestResponse..::..PublishRequestCallback Method (TheMessageAddress, TheMessageAddress, String, TimeSpan, Action<(Of <(<'TSM>)>)>, array<String>[]()[][], String, array<Byte>[]()[][])

Sends a message with the given TXT and PLS/PLB to the target and returns the response message to the callback as a TSM parameter.

Namespace:  nsCDEngine.Communication
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static void PublishRequestCallback(
	TheMessageAddress originator,
	TheMessageAddress target,
	string messageName,
	TimeSpan timeout,
	Action<TSM> responseCallback,
	string[] txtParameters,
	string PLS,
	byte[] PLB
)
Public Shared Sub PublishRequestCallback ( _
	originator As TheMessageAddress, _
	target As TheMessageAddress, _
	messageName As String, _
	timeout As TimeSpan, _
	responseCallback As Action(Of TSM), _
	txtParameters As String(), _
	PLS As String, _
	PLB As Byte() _
)
public:
static void PublishRequestCallback(
	TheMessageAddress^ originator, 
	TheMessageAddress^ target, 
	String^ messageName, 
	TimeSpan^ timeout, 
	Action<TSM^>^ responseCallback, 
	array<String^>^ txtParameters, 
	String^ PLS, 
	array<unsigned char^>^ PLB
)

Parameters

originator
Type: nsCDEngine.Communication..::..TheMessageAddress
Thing or engine to use for response messages. If NULL defaults to ContentService.
target
Type: nsCDEngine.Communication..::..TheMessageAddress
Thing or engine to which the message is to be sent.
messageName
Type: String
The "command" of the message. This will be the first entry in the TXT separated by ':', i.e. messageName:correlationToken:txtParameter1:txtParameter2...
timeout
Type: TimeSpan
If the response message is not returned to the callback within this time, the callback will be invoked with a null parameter.
responseCallback
Type: Action<(Of <(<'TSM>)>)>
The method that will be called once the response message has been received or a timeout has occured. The parameter will contain the message as a TSM, or null if a timeout occurs.
txtParameters
Type: array<String>[]()[][]
The strings that will follow messageName and the correlation token in the TXT separated by ':', i.e. messageName:correlationToken:txtParameter1:txtParameter2...
PLS
Type: String
The payload of the message as a string.
PLB
Type: array<Byte>[]()[][]
The payload of the message as a byte[].