« Back to Product

Documentation

VIO_SendPacket

Require: IP-Symcon >= 5.1

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

Parameters

InstanceID

ID of the virtual I/O to be updated

Text

The string to be sent

ClientIP

On the ClientIP to be sent

ClientPort

On the port to be sent

Returns

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

Description

Sends a data packet of the type Extended(Socket) to the Virtual I/O with the ID InstanceID itself. This includes: Type = 0 (Data), Buffer = Text, ClientIP = ClientIP and ClientPort = ClientPort.

Example

// Sends the text "Hello world" with the IP address 192.168.0.8 and the port 502 to the Virtual I/O instance with the ID 12345
VIO_PushPacket(12345, "Hello World", "192.168.0.8", 502);
Any questions?