TsgcWebSocketClient | Client Send Text Message

Once client has connected to server, it can send Text Messages to server. To send a Text Message, just call WriteData() method and send your text message.

 

Send a Text Message

Call To WriteData() method and send a Text message. This method is executed on the same thread that is called.


TsgcWebSocketClient1.WriteData('My First sgcWebSockets Message!.');

If QueueOptions.Text has a different value from qmNone, instead of be processed on the same thread that is called, it will be processed on a secondary thread. By default this option is disabled.

 

 

Send a Text Message and Wait the Response

Call To WriteAndWaitData() method to send a Text message and wait a response from the server. The function returns the text message received.

 


TsgcWebSocketClient1.WriteAndWaitDataData('My First sgcWebSockets Message!.');