Increased max size of buffer for received data

Note: this number should be made to be dynamic
yamux
John Jones 2017-04-24 16:33:23 -05:00
parent 22a782d9f1
commit 3463196f9c
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,8 @@ int libp2p_net_multistream_read(void* stream_context, unsigned char** results, s
struct SessionContext* session_context = (struct SessionContext*)stream_context;
struct Stream* stream = session_context->insecure_stream;
int bytes = 0;
size_t buffer_size = 65535;
// TODO: this is arbitrary, and should be dynamic
size_t buffer_size = 362144;
char buffer[buffer_size];
char* pos = buffer;
size_t num_bytes_requested = 0, left = 0, already_read = 0;