Added some questionable support for running everything in one process, because iOS.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4520 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-10-15 17:33:36 +00:00
parent 8bd0027e71
commit a69e551968
5 changed files with 98 additions and 34 deletions

View File

@ -1,5 +1,6 @@
#include "packetstream.h"
#include "log.h"
#include "mem.h"
#include "uv.h"
@ -116,7 +117,11 @@ static void _packetstream_on_read(uv_stream_t* handle, ssize_t count, const uv_b
void tf_packetstream_start(tf_packetstream_t* stream)
{
stream->stream.data = stream;
uv_read_start((uv_stream_t*)&stream->stream, _packetstream_allocate, _packetstream_on_read);
int result = uv_read_start((uv_stream_t*)&stream->stream, _packetstream_allocate, _packetstream_on_read);
if (result)
{
tf_printf("uv_read_start: %s\n", uv_strerror(result));
}
}
static void _packetstream_on_write(uv_write_t* request, int status)