Hexillion
 

QueryBinary method

Syntax: Reply = QueryBinary ( Query )

Part Type Description
Reply Variant (byte array) Response from the remote host. If an error occurs, this will be an empty array.
Query Variant (string or byte array) Query to send to the remote host.

This method performs a simple TCP query with binary data.

When called, the QueryBinary method opens a TCP connection to the remote host and port specified by the RemoteAddr and RemotePort properties, respectively. QueryBinary then sends Query, stores the response in Reply, and closes the connection.

If the total time for the QueryBinary call exceeds Timeout or encounters another error, QueryBinary will return an empty array. Check the Error property for an error code.

If you pass a string in as Query, QueryBinary will internally convert the string from Unicode to ANSI before sending it to the remote host. If Query is a byte array, QueryBinary will send it verbatim. In either case, QueryBinary returns the remote host's exact response as a byte array--no processing is done on the data.

Show site map

contact us    privacy policy    legal information