Provides functions and structures for reading, writing, and manipulating Guacamole instructions. More...
Go to the source code of this file.
Data Structures | |
struct | guac_instruction |
Represents a single instruction within the Guacamole protocol. More... |
Functions | |
void | guac_instruction_free (guac_instruction *instruction) |
Frees all memory allocated to the given instruction. | |
int | guac_instruction_waiting (guac_socket *socket, int usec_timeout) |
Returns whether new instruction data is available on the given guac_socket connection for parsing. | |
guac_instruction * | guac_instruction_read (guac_socket *socket, int usec_timeout) |
Reads a single instruction from the given guac_socket connection. | |
guac_instruction * | guac_instruction_expect (guac_socket *socket, int usec_timeout, const char *opcode) |
Reads a single instruction with the given opcode from the given guac_socket connection. |
Provides functions and structures for reading, writing, and manipulating Guacamole instructions.
guac_instruction* guac_instruction_expect | ( | guac_socket * | socket, |
int | usec_timeout, | ||
const char * | opcode | ||
) |
Reads a single instruction with the given opcode from the given guac_socket connection.
If an error occurs reading the instruction, NULL is returned, and guac_error is set appropriately.
If the instruction read is not the expected instruction, NULL is returned, and guac_error is set to GUAC_STATUS_BAD_STATE.
socket | The guac_socket connection to use. |
usec_timeout | The maximum number of microseconds to wait before giving up. |
opcode | The opcode of the instruction to read. |
void guac_instruction_free | ( | guac_instruction * | instruction | ) |
Frees all memory allocated to the given instruction.
instruction | The instruction to free. |
guac_instruction* guac_instruction_read | ( | guac_socket * | socket, |
int | usec_timeout | ||
) |
Reads a single instruction from the given guac_socket connection.
If an error occurs reading the instruction, NULL is returned, and guac_error is set appropriately.
socket | The guac_socket connection to use. |
usec_timeout | The maximum number of microseconds to wait before giving up. |
int guac_instruction_waiting | ( | guac_socket * | socket, |
int | usec_timeout | ||
) |
Returns whether new instruction data is available on the given guac_socket connection for parsing.
socket | The guac_socket connection to use. |
usec_timeout | The maximum number of microseconds to wait before giving up. |