|
|
void | rapido_set_add (rapido_set_t *set, uint32_t value) |
| | Adds the given value to the set when it can contains, otherwise fails.
|
| |
|
bool | rapido_set_has (rapido_set_t *set, uint32_t value) |
| | Returns whether the set contains the given value.
|
| |
|
void | rapido_set_remove (rapido_set_t *set, uint32_t value) |
| | Removes the given value from the set.
|
| |
|
size_t | rapido_set_size (rapido_set_t *set) |
| | Returns the number of element in the set.
|
| |
| void * | rapido_queue_pop (rapido_queue_t *queue) |
| | Returns a pointer to an element poped from the front of the queue. More...
|
| |
|
rapido_server_t * | rapido_new_server (ptls_context_t *tls_ctx, const char *server_name, FILE *qlog_out) |
| | Creates a new rapido server.
|
| |
|
rapido_address_id_t | rapido_add_server_address (rapido_server_t *server, struct sockaddr *addr, socklen_t addr_len, bool add_listen_socket) |
| | Adds a local address to the server, and creates a listen socket bound to the address when required.
|
| |
|
int | rapido_remove_server_address (rapido_session_t *session, rapido_address_id_t local_address_id) |
| | Removes a local address from the server.
|
| |
|
int | rapido_run_server_network (rapido_server_t *server, int timeout) |
| | Runs the server for some time.
|
| |
|
rapido_application_notification_t * | rapido_next_server_notification (rapido_server_t *server, size_t *session_index) |
| | Pops the next notification and gets the index of the corresponding session.
|
| |
|
rapido_session_t * | rapido_new_session (ptls_context_t *tls_ctx, bool is_server, const char *server_name, FILE *qlog_out) |
| | Creates a new rapido session.
|
| |
|
rapido_address_id_t | rapido_add_address (rapido_session_t *session, struct sockaddr *addr, socklen_t addr_len) |
| | Adds a local address to the session.
|
| |
|
rapido_address_id_t | rapido_add_remote_address (rapido_session_t *session, struct sockaddr *addr, socklen_t addr_len) |
| | Adds a remote address to the session.
|
| |
|
int | rapido_remove_address (rapido_session_t *session, rapido_address_id_t local_address_id) |
| | Removes a local address from the session.
|
| |
|
rapido_connection_id_t | rapido_create_connection (rapido_session_t *session, uint8_t local_address_id, uint8_t remote_address_id) |
| | Creates a new connection for the session with the given local and remote addresses.
|
| |
|
rapido_connection_id_t | rapido_client_add_connection (rapido_session_t *session, int fd, uint8_t local_address_id, uint8_t remote_address_id) |
| | Adds the given file descriptor to the session as a new connection with the given local and remote addresses.
|
| |
|
int | rapido_run_network (rapido_session_t *session, int timeout) |
| | Runs the session for some time.
|
| |
|
int | rapido_retransmit_connection (rapido_session_t *session, rapido_connection_id_t connection_id, rapido_set_t connections) |
| | Marks the given set of connections as eligible for retransmitting the content of the given connection.
|
| |
|
int | rapido_close_connection (rapido_session_t *session, rapido_connection_id_t connection_id) |
| | Gracefully closes the connection.
|
| |
|
int | rapido_close_session (rapido_session_t *session, rapido_connection_id_t connection_id) |
| | Gracefully closes the session and send the TLS alert on the given connection.
|
| |
|
rapido_stream_id_t | rapido_open_stream (rapido_session_t *session) |
| | Add a new stream to the session.
|
| |
|
int | rapido_attach_stream (rapido_session_t *session, rapido_stream_id_t stream_id, rapido_connection_id_t connection_id) |
| | Marks the connection as eligible to send content of this stream.
|
| |
|
int | rapido_detach_stream (rapido_session_t *session, rapido_stream_id_t stream_id, rapido_connection_id_t connection_id) |
| | Removes the mark of elibility of this connection for sending the content of this stream.
|
| |
|
int | rapido_add_to_stream (rapido_session_t *session, rapido_stream_id_t stream_id, void *data, size_t len) |
| | Adds the given data to the end of the stream.
|
| |
|
int | rapido_add_to_stream_notify (rapido_session_t *session, rapido_stream_id_t stream_id, void *data, size_t len, void *app_ctx) |
| | Adds the given data to the end of the stream and registers a notification containing the given application context when the data has been written in frames.
|
| |
|
int | rapido_set_stream_producer (rapido_session_t *session, rapido_stream_id_t stream_id, rapido_stream_producer_t producer, void *producer_ctx) |
| | Sets the given function and associated context as a data producer for this stream.
|
| |
|
void * | rapido_read_stream (rapido_session_t *session, rapido_stream_id_t stream_id, size_t *len) |
| | Returns a pointer to read at most the *len following bytes from this stream.
|
| |
|
int | rapido_close_stream (rapido_session_t *session, rapido_stream_id_t stream_id) |
| | Marks the end of this stream.
|
| |
|
int | rapido_session_accept_new_connection (rapido_session_t *session, int accept_fd, rapido_address_id_t local_address_id) |
| | Adds a given file descriptor as a new connection to a session.
|
| |
|
int | rapido_server_accept_new_connection (rapido_server_t *server, int accept_fd, rapido_address_id_t local_address_id) |
| | Accepts from a given file descriptor and adds the new connection to the server.
|
| |
|
size_t | rapido_server_add_new_connection (rapido_array_t *pending_connections, ptls_context_t *tls_ctx, ptls_t *tls, const char *server_name, int conn_fd, rapido_address_id_t local_address_id) |
| | Adds the new connection to pending connections and returns its index within the latter array.
|
| |
|
int | rapido_client_process_handshake (rapido_session_t *session, rapido_connection_id_t connection_id, uint8_t *buffer, size_t *len) |
| | Processes data received by a client during the handshake and returns whether the handshake is complete.
|
| |
| int | rapido_server_process_handshake (rapido_server_t *server, rapido_session_t *session, rapido_array_t *pending_connections, size_t pending_connection_index, uint8_t *buffer, size_t *len, ptls_buffer_t *handshake_buffer, rapido_session_t **created_session, rapido_connection_t **created_connection) |
| | Processes data received by a server during the handshake. More...
|
| |
|
void | rapido_process_incoming_data (rapido_session_t *session, rapido_connection_id_t connection_id, uint64_t current_time, uint8_t *buffer, size_t *len) |
| | Processes incoming data received after the handshake.
|
| |
|
int | rapido_connection_wants_to_send (rapido_session_t *session, rapido_connection_t *connection, uint64_t current_time, bool *is_blocked) |
| | Returns whether the given connection wants to send data.
|
| |
|
void | rapido_prepare_data (rapido_session_t *session, rapido_connection_id_t connection_id, uint64_t current_time, uint8_t *buffer, size_t *len) |
| | Prepares data to send.
|
| |
|
void | rapido_connection_set_app_ptr (rapido_session_t *session, rapido_connection_id_t connection_id, void *app_ptr) |
| | Sets an application pointer associated with the given connection.
|
| |
|
void * | rapido_connection_get_app_ptr (rapido_session_t *session, rapido_connection_id_t connection_id) |
| | Gets an application pointer associated with the given connection.
|
| |
|
void | rapido_connection_get_info (rapido_session_t *session, rapido_connection_id_t connection_id, rapido_connection_info_t *info) |
| | Returns TCP-level information on the given connection.
|
| |
|
int | rapido_session_free (rapido_session_t *session) |
| | Deallocates the memory zones referenced in this session structure.
|
| |
|
int | rapido_server_free (rapido_server_t *server) |
| | Deallocates the memory zones referenced in this server structure.
|
| |