Send poll responses in client code rather than sockloop

This commit is contained in:
Jop Zitman 2024-12-18 15:19:31 +08:00
parent dbf3190c4f
commit eb6c7b538f
6 changed files with 177 additions and 4 deletions

View file

@ -0,0 +1,15 @@
#ifndef SLIPSTREAM_PACKET
#define SLIPSTREAM_PACKET
#include <stdbool.h>
#include "picoquic.h"
#define PICOQUIC_SHORT_HEADER_CONNECTION_ID_SIZE 8
bool slipstream_packet_is_long_header(const uint8_t first_byte);
int slipstream_packet_create_poll(uint8_t** dest_buf, size_t* dest_buf_len, picoquic_connection_id_t dst_connection_id);
int slipstream_packet_parse(uint8_t* src_buf, size_t src_buf_len, size_t short_header_conn_id_len, picoquic_connection_id_t* src_connection_id, picoquic_connection_id_t* dst_connection_id, bool* is_poll_packet);
#endif // SLIPSTREAM_PACKET