1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-18 16:33:31 +00:00

1. Updated libfinder for Linux for cases when ldconfig is not on PATH

2. Updated websockets, so it will autofragment into 30k chunks, as a temp workaround for platforms like CentOS 5.11 until I find the underlying issue
This commit is contained in:
Bryan Roe
2019-08-21 11:46:38 -07:00
parent dda535a817
commit 1360835f1b
3 changed files with 31 additions and 7 deletions

View File

@@ -3973,7 +3973,22 @@ int ILibDuktape_httpStream_webSocket_EncodedUnshiftSink(ILibDuktape_DuplexStream
ILibTransport_DoneState ILibDuktape_httpStream_webSocket_DecodedWriteSink(ILibDuktape_DuplexStream *stream, char *buffer, int bufferLen, void *user)
{
ILibDuktape_WebSocket_State *state = (ILibDuktape_WebSocket_State*)user;
return(ILibDuktape_httpStream_webSocket_WriteWebSocketPacket(state, stream->writableStream->Reserved == 1 ? ILibWebClient_WebSocket_DataType_TEXT : ILibWebClient_WebSocket_DataType_BINARY, buffer, bufferLen, ILibWebClient_WebSocket_FragmentFlag_Complete));
int maxsize = 30000;
int sendSize = 0;
if (bufferLen < maxsize)
{
return(ILibDuktape_httpStream_webSocket_WriteWebSocketPacket(state, stream->writableStream->Reserved == 1 ? ILibWebClient_WebSocket_DataType_TEXT : ILibWebClient_WebSocket_DataType_BINARY, buffer, bufferLen, ILibWebClient_WebSocket_FragmentFlag_Complete));
}
else
{
while(bufferLen > 0)
{
sendSize = bufferLen > maxsize ? maxsize : bufferLen;
bufferLen -= sendSize;
ILibDuktape_httpStream_webSocket_WriteWebSocketPacket(state, stream->writableStream->Reserved == 1 ? ILibWebClient_WebSocket_DataType_TEXT : ILibWebClient_WebSocket_DataType_BINARY, buffer, sendSize, bufferLen>0?ILibWebClient_WebSocket_FragmentFlag_Incomplete : ILibWebClient_WebSocket_FragmentFlag_Complete);
buffer += sendSize;
}
}
}
void ILibDuktape_httpStream_webSocket_DecodedEndSink(ILibDuktape_DuplexStream *stream, void *user)
{