« Back to Product

Documentation

RegVar_SendPacket

Require: IP-Symcon >= 4.1

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

Parameters

InstanceID

ID of the RegisterVariable-Instance

Text

Buffer to send

ClientIP

IP address to send to

ClientPort

Port to send to

Returns

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

Description

Sends a data packet Text via the instance with the ID InstanceID. In addition, the IP address ClientIP and the port ClientPort are specified.

Warning

RegVar_SendPacket can only be used in connection with a ServerSocket instance

Example

// Sends the packet "Hello World" via ServerSocket to IP:Port 192.168.1.2:1234
RegVar_SendPacket(12345, "Hello World", "192.168.1.2", 1234);
Any questions?