« Back to Product

Documentation

SSCK_SendPacket

Require: IP-Symcon >= 4.1

 boolean SSCK_SendPacket (int $InstanceID, string $Text, string $ClientIP, int $ClientPort) 

Parameters

InstanceID

ID of the server socket to be updated

Text

The string to be sent

ClientIP

Recipient's IP

ClientPort

Recipient's port

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

Sends the string Text on the server socket with the ID InstanceID. The IP ClientIP and port ClientPort are used as recipient addressing.

Warning

If there is no connection from the IP address on the corresponding port, the string to be sent is discarded

Example

//Sends the packet with the data record "Any data record" on the server socket with ID 12345 to the IP:Port 192.168.1.123:1234
SSCK_SendPacket(12345, "Any data record", "192.168.1.123", 1234);
Any questions?