Tilde Friends
packetstream.h
1#pragma once
2
9#include <stddef.h>
10
12typedef struct uv_pipe_s uv_pipe_t;
13
15typedef struct _tf_packetstream_t tf_packetstream_t;
16
24typedef void(tf_packetstream_onreceive_t)(int packet_type, const char* begin, size_t length, void* user_data);
25
30typedef void(tf_packetstream_on_close_t)(void* user_data);
31
37
43
49
57void tf_packetstream_send(tf_packetstream_t* stream, int packet_type, const char* begin, size_t length);
58
66
74
80
87
void tf_packetstream_close(tf_packetstream_t *stream)
void tf_packetstream_start(tf_packetstream_t *stream)
struct uv_pipe_s uv_pipe_t
Definition: packetstream.h:12
struct _tf_packetstream_t tf_packetstream_t
Definition: packetstream.h:15
uv_pipe_t * tf_packetstream_get_pipe(tf_packetstream_t *stream)
void() tf_packetstream_on_close_t(void *user_data)
Definition: packetstream.h:30
void tf_packetstream_send(tf_packetstream_t *stream, int packet_type, const char *begin, size_t length)
void tf_packetstream_set_on_close(tf_packetstream_t *stream, tf_packetstream_on_close_t *callback, void *user_data)
tf_packetstream_t * tf_packetstream_create()
void tf_packetstream_set_on_receive(tf_packetstream_t *stream, tf_packetstream_onreceive_t *callback, void *user_data)
void tf_packetstream_destroy(tf_packetstream_t *stream)
void() tf_packetstream_onreceive_t(int packet_type, const char *begin, size_t length, void *user_data)
Definition: packetstream.h:24