Allows the communication with a port of a machine in binary format. Sends a message in binary format and returns the response as a binary.
1 socket.out.write
<socket.out.write>
<socket /> +
<stream /> +
</socket.out.write>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Esocket | Socket | Socket type object. | |||
Estream | Object2byte | Any object convertible in an array of bytes (string, bytes, array, etc). |
Returns | |
---|---|
Type | Description |
stream | Array of bytes, response which returns the service before the request performed. |
Example
Opens a socket against an IP and sends a byte represented by the integer 4.
Copy
<xsql-script name='socket'> <body> <set name='s'> <socket host='192.168.1.1' port='12000' /> </set> <socket.out.write> <s /> <byte>4</byte> </socket.out.write> </body> </xsql-script>