|
football
socket abstraction layer
|
Football transport layer implementation. More...
#include <config.h>#include <errno.h>#include <assert.h>#include "fb_public.h"#include "fb_transport.h"#include "fb_service.h"#include <sys/socket.h>Macros | |
| #define | MSG_NOSIGNAL (0) |
| #define | TLS_PUBLIC_KEY_FILE "x509-server-key.pem" |
| #define | TLS_CERTIFICATE_FILE "x509-server.pem" |
Functions | |
| bool | fb_unencrypted_init (struct fb_connection_t *connection) |
| ssize_t | fb_unencrypted_handshake (struct fb_connection_t *connection) |
| Perform TLS handshaking on a new connection. Return incomplete, failure, or 0. | |
| ssize_t | fb_unencrypted_buffering (struct fb_connection_t *connection) |
| Query number of bytes in TLS buffers. | |
| ssize_t | fb_unencrypted_read (struct fb_connection_t *connection, char *data, ssize_t byte_count) |
| ssize_t | fb_unencrypted_write (struct fb_connection_t *connection, const char *data, ssize_t byte_count) |
| void | fb_unencrypted_done (FB_CONNECTION *connection) |
| bool | fb_file_init (struct fb_connection_t *connection) |
| ssize_t | fb_file_read (struct fb_connection_t *connection, char *data, ssize_t byte_count) |
| ssize_t | fb_file_write (struct fb_connection_t *connection, const char *data, ssize_t byte_count) |
| void | fb_file_done (FB_CONNECTION *connection) |
| bool | fb_init_tls_support (const char *path) |
| void | fb_cleanup_tls_support (void) |
Variables | |
| const ssize_t | FB_TRANSPORT_CLOSED = 0 |
| Connection closed normally. Returned by read transport function only. | |
| const ssize_t | FB_TRANSPORT_INCOMPLETE = -1 |
| An action was incomplete, but can be retried in the future. | |
| const ssize_t | FB_TRANSPORT_FAILURE = -2 |
| An action failed permanently; the connection has failed and should be closed. | |
| const FB_TRANSPORT_FUNCS | fb_transport_unencrypted |
| Transport virtual method table for unenrypted connections. | |
| const FB_TRANSPORT_FUNCS | fb_transport_read_file |
| Transport virtual method table for reading from files. | |
Football transport layer implementation.
Generic functions and support for unsecured connections and files.
| const FB_TRANSPORT_FUNCS fb_transport_read_file |
Transport virtual method table for reading from files.
| const FB_TRANSPORT_FUNCS fb_transport_unencrypted |
Transport virtual method table for unenrypted connections.