OrtcSendMessage Method Open Real Time Connectivity Application Programming Interface Help
Sends a message to a channel.

Namespace: Ibt.Ortc.Api
Assembly: Ibt.Ortc.Api (in Ibt.Ortc.Api.dll) Version: 2.1.14.0 (2.1.14)
Syntax

public static bool SendMessage(
	string url,
	bool isCluster,
	string authenticationToken,
	string applicationKey,
	string privateKey,
	string channel,
	string message
)

Parameters

url
Type: SystemString
ORTC server URL.
isCluster
Type: SystemBoolean
Indicates whether the ORTC server is in a cluster.
authenticationToken
Type: SystemString
Authentication Token which is generated by the application server, for instance a unique session ID.
applicationKey
Type: SystemString
Application Key that was provided to you together with the ORTC service purchasing.
privateKey
Type: SystemString
The private key provided to you together with the ORTC service purchasing.
channel
Type: SystemString
The channel where the message will be sent.
message
Type: SystemString
The message to send.

Return Value

Type: Boolean
True if the send was successful or false if it was not.
Exceptions

ExceptionCondition
OrtcEmptyFieldExceptionServer URL can not be null or empty.
OrtcAuthenticationNotAuthorizedExceptionUnauthorized by the server.
OrtcNotConnectedExceptionUnable to connect to the authentication server.
Examples

string url = "http://ortc_server"; // ORTC HTTP server
bool isCluster = false;
string authenticationToken = "myAuthenticationToken";
string applicationKey = "myApplicationKey";
string privateKey = "myPrivateKey";
string channel = "channel1";
string message = "The message to send";

bool messageSent = Ibt.Ortc.Api.Ortc.SendMessage(url, isCluster, authenticationToken, applicationKey, privateKey, channel, message))
See Also

Reference