Function type definitions related to the guac_socket object. More...
Go to the source code of this file.
Typedefs | |
typedef ssize_t | guac_socket_read_handler (guac_socket *socket, void *buf, size_t count) |
Generic read handler for socket read operations, modeled after the standard POSIX read() function. | |
typedef ssize_t | guac_socket_write_handler (guac_socket *socket, const void *buf, size_t count) |
Generic write handler for socket write operations, modeled after the standard POSIX write() function. | |
typedef int | guac_socket_select_handler (guac_socket *socket, int usec_timeout) |
Generic handler for socket select operations, similar to the POSIX select() function. | |
typedef int | guac_socket_free_handler (guac_socket *socket) |
Generic handler for the closing of a socket, modeled after the standard POSIX close() function. |
Function type definitions related to the guac_socket object.
typedef int guac_socket_free_handler(guac_socket *socket) |
Generic handler for the closing of a socket, modeled after the standard POSIX close() function.
When set within a guac_socket, a handler of this type will be called when the socket is closed.
socket | The guac_socket being closed. |
typedef ssize_t guac_socket_read_handler(guac_socket *socket, void *buf, size_t count) |
Generic read handler for socket read operations, modeled after the standard POSIX read() function.
When set within a guac_socket, a handler of this type will be called when data needs to be read into the socket.
socket | The guac_socket being read from. |
buf | The arbitrary buffer we must populate with data. |
count | The maximum number of bytes to read into the buffer. |
typedef int guac_socket_select_handler(guac_socket *socket, int usec_timeout) |
Generic handler for socket select operations, similar to the POSIX select() function.
When guac_socket_select() is called on a guac_socket, its guac_socket_select_handler will be invoked, if defined.
socket | The guac_socket being selected. |
usec_timeout | The maximum number of microseconds to wait for data, or -1 to potentially wait forever. |
typedef ssize_t guac_socket_write_handler(guac_socket *socket, const void *buf, size_t count) |
Generic write handler for socket write operations, modeled after the standard POSIX write() function.
When set within a guac_socket, a handler of this type will be called when data needs to be write into the socket.
socket | The guac_socket being written to. |
buf | The arbitrary buffer containing data to be written. |
count | The maximum number of bytes to write from the buffer. |