JARDIN_DEFAULT_RECV_BUFFER_SIZE is too big

Bug #494242 reported by Aleksander Morgado
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
El Jardin
Fix Released
Low
Terry

Bug Description

JARDIN_DEFAULT_RECV_BUFFER_SIZE is hardcoded and equal to 65k. This means that for every new connection module, we allocate such big buffer, and never will be fully used. For STREAM protocol, the upper-level application should control the number of received bytes, and for DGRAM protocol, datagrams are usually less than 1500 bytes, as most of times we're talking about ethernet... so maybe we can define a new function in Jardin to set the default buffer size explicitly, and not use the 65k default value. Will make things faster probably.

Changed in eljardin:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Aleksander Morgado (aleksander-m) wrote :

Two new API methods are needed:

jardin_status_t
jardin_server_set_default_buffer_size(jardin_server_t server, gssize buffer_size);

jardin_status_t
jardin_client_set_default_buffer_size(jardin_client_t client, gssize buffer_size);

Those functions will internally set the buffer size to be used, instead of the default 65k. Given size should be in BYTES. If that function is not called, default buffer size of 65k should be used. Those functions should be called just after creation of the Jardin Server or Client.

Additional tests are needed to check that long stream of bytes are properly sent/received even if using small buffer sizes.

Changed in eljardin:
assignee: nobody → Terry (cellterry)
status: Confirmed → Fix Committed
Changed in eljardin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.