21 #ifndef _GUAC_PARSER_H 22 #define _GUAC_PARSER_H 75 char* __instructionbuf_unparsed_start;
80 char* __instructionbuf_unparsed_end;
87 char __instructionbuf[32768];
char ** argv
Array of all arguments passed to this instruction.
Definition: parser.h:49
guac_parser * guac_parser_alloc()
Allocates a new parser.
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_expect(guac_parser *parser, guac_socket *socket, int usec_timeout, const char *opcode)
Reads a single instruction from the given guac_socket.
Type definitions related to the guac_socket object.
int guac_parser_append(guac_parser *parser, void *buffer, int length)
Appends data from the given buffer to the given parser.
The core I/O object of Guacamole.
Definition: socket.h:38
Type definitions related to parsing the Guacamole protocol.
int guac_parser_length(guac_parser *parser)
Returns the number of unparsed bytes stored in the given parser's internal buffers.
void guac_parser_free(guac_parser *parser)
Frees all memory allocated to the given parser.
char * opcode
The opcode of the instruction.
Definition: parser.h:39
guac_parse_state
All possible states of the instruction parser.
Definition: parser-types.h:33
guac_parse_state state
The parse state of the instruction.
Definition: parser.h:54
int argc
The number of arguments passed to this instruction.
Definition: parser.h:44
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...
#define GUAC_INSTRUCTION_MAX_ELEMENTS
The maximum number of elements per instruction, including the opcode.
Definition: parser-constants.h:42
A Guacamole protocol parser, which reads individual instructions, filling its own internal structure ...
Definition: parser.h:34
Constants related to the Guacamole protocol parser.