<< SOCKET_pause Socket Toolbox SOCKET_read >>

Socket Toolbox >> Socket Toolbox > SOCKET_query

SOCKET_query

Query on an opened SOCKET Session

Calling Sequence

mat = SOCKET_query(id,commande)

Parameters

id

specify the opened socket session you want to query. It's an integer.

commande

It's a string you want to send to the opened socket during the query.

mat

Matrix of string. This is the response of your query on the selected socket session.

Description

This function enable to query a socket. This is just a combinaison of SOCKET_write() and SOCKET_read() functions.

Examples

SOCKET_open(1,"10.0.0.1",23); // The session #1 is opened
SOCKET_open(2,"10.0.0.2",23); // The session #2 is opened

// Now we can communicate with devices...
SOCKET_query(2,"help")
SOCKET_query(1,"IP?")

// TO close every WinSocket session...
SOCKET_close(2);
SOCKET_close(1);

See Also

Authors


Report an issue
<< SOCKET_pause Socket Toolbox SOCKET_read >>