74 char* __instructionbuf_unparsed_start;
79 char* __instructionbuf_unparsed_end;
86 char __instructionbuf[32768];
Constants related to the Guacamole protocol parser.
#define GUAC_INSTRUCTION_MAX_ELEMENTS
The maximum number of elements per instruction, including the opcode.
Definition parser-constants.h:42
Type definitions related to parsing the Guacamole protocol.
guac_parse_state
All possible states of the instruction parser.
Definition parser-types.h:32
guac_parser * guac_parser_alloc()
Allocates a new parser.
int guac_parser_shift(guac_parser *parser, void *buffer, int length)
Removes up to length bytes from internal buffer of unparsed bytes, storing them in the given buffer.
int guac_parser_length(guac_parser *parser)
Returns the number of unparsed bytes stored in the given parser's internal buffers.
int guac_parser_read(guac_parser *parser, guac_socket *socket, int usec_timeout)
Reads a single instruction from the given guac_socket connection.
int guac_parser_append(guac_parser *parser, void *buffer, int length)
Appends data from the given buffer to the given parser.
int guac_parser_expect(guac_parser *parser, guac_socket *socket, int usec_timeout, const char *opcode)
Reads a single instruction from the given guac_socket.
void guac_parser_free(guac_parser *parser)
Frees all memory allocated to the given parser.
Type definitions related to the guac_socket object.
A Guacamole protocol parser, which reads individual instructions, filling its own internal structure ...
Definition parser.h:33
guac_parse_state state
The parse state of the instruction.
Definition parser.h:53
int argc
The number of arguments passed to this instruction.
Definition parser.h:43
char * opcode
The opcode of the instruction.
Definition parser.h:38
char ** argv
Array of all arguments passed to this instruction.
Definition parser.h:48
The core I/O object of Guacamole.
Definition socket.h:39