Command network.send

Learn more about Host integration - Simple HTTP

The command network.send is used to send a message (hexadecimal) to the host.

Parameters

  1. buffer [string]
    Message, hexadecimal, which will be sent to the host.
  2. size [integer]
    Size of the message in bytes.
  3. variablereturn [integer]
    Return of the function:
    • 1: Message successfully sent
    • 0: Unable to send the message

Example


In the example above the command preconnect will make a connection with the CloudWalk Walk Server and the return will be stored in the variable iConnect.

The command network.send will send a message, hexadecimal to the host and its return will be stored in the variable iReturn.

To convert the text of the variable sBufSend into hexadecimal, the command will be used string.tohex and size will be calculated by the command string.length.