Increased max size of buffer for received data

Note: this number should be made to be dynamic
This commit is contained in:
John Jones 2017-04-24 16:33:23 -05:00
parent 22a782d9f1
commit 3463196f9c

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 SessionContext* session_context = (struct SessionContext*)stream_context;
struct Stream* stream = session_context->insecure_stream; struct Stream* stream = session_context->insecure_stream;
int bytes = 0; 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 buffer[buffer_size];
char* pos = buffer; char* pos = buffer;
size_t num_bytes_requested = 0, left = 0, already_read = 0; size_t num_bytes_requested = 0, left = 0, already_read = 0;