Merge branches/quickjs to trunk. This is the way.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3621 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-01-02 18:10:00 +00:00
parent d293637741
commit 79022e1e1f
703 changed files with 419987 additions and 30640 deletions

18
src/packetstream.h Normal file
View File

@ -0,0 +1,18 @@
#pragma once
#include <stddef.h>
typedef struct uv_pipe_s uv_pipe_t;
typedef struct _tf_packetstream_t tf_packetstream_t;
typedef void (tf_packetstream_onreceive_t)(int packet_type, const char* begin, size_t length, void* user_data);
tf_packetstream_t* tf_packetstream_create();
void tf_packetstream_destroy(tf_packetstream_t* stream);
void tf_packetstream_start(tf_packetstream_t* stream);
void tf_packetstream_send(tf_packetstream_t* stream, int packet_type, char* begin, size_t length);
void tf_packetstream_set_on_receive(tf_packetstream_t* stream, tf_packetstream_onreceive_t* callback, void* user_data);
void tf_packetstream_close(tf_packetstream_t* stream);
uv_pipe_t* tf_packetstream_get_pipe(tf_packetstream_t* stream);