| Helper Functions | |
| Functions | |
| _TCP_GetCmd | Analyse a packet created by _TCP_MakeCmd, and extract the packet name, the parameters, and the data |
| _TCP_MakeCmd | Create a packet to be sent over TCP, can have |
Analyse a packet created by _TCP_MakeCmd, and extract the packet name, the parameters, and the data
_TCP_GetCmd($rData, ByRef $sCmd, ByRef $aParams, ByRef $Data)
| $rData | The packet |
| $sCmd | Will be filled with the packet name |
| $aParams | Will be filled with a 1-Based array, where Elem[0] is the number of parameters, and the other elements Elem[x], will be the parameters |
| $Data | Will be filled with the packet’s Data |
| Succes | 1 |
| Failed | 0 And set @error = 1 if the packet isn’t valid |
Create a packet to be sent over TCP, can have
_TCP_MakeCmd($sCmd, $aParams, $Data)
| $sCmd | Command name |
| $aParams | Eiter an 0-Based array containing the parameters, or a string with the parameters delimited by Chr(31) |
| $Data | The data of the packet, string, binary string... |
| Succes | The packet |