Command network.receive

Learn more about Host integration - Simple HTTP

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

Parameters

  1. maxsize [integer]
    Maximum message size that can be received.
  2. variablereceivedbytes [integer]
    Number of received bytes.
  3. variablebuffer [string]
    Variable that will receive the message from the host.
  4. variablereturn [integer]
    Return of the function:
    • 1: Message successfully received
    • 0: Could not receive 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 for the host and its return will be stored in the variable iReturn.

The command network.receive will receive a message, hexadecimal from the host and the return will be stored in the variable variablebuffer, which should be converted into stringvariable with the function string.fromhex.