[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112&from=L21haW4-

Olivier CRUILLES reported a new bug.

Summary
-------

Request to add bufferSize configuration into Local Socket - gb.net

Type             : Request
Priority         : Medium
Gambas version   : 3.9.90 (TRUNK)
Product          : Networking components


Description
-----------

Hello Benoit,
It is possible to add an option to configure the buffer value of a Socket in gb.net ?
I did not find it in the documentation.
thank you


System information
------------------

[System]
Gambas=3.9.90
OperatingSystem=Linux
Kernel=4.4.0-75-generic
Architecture=x86
Distribution=Linux Mint 18.1 Serena
Desktop=MATE
Theme=Gtk
Language=fr_CA.UTF-8
Memory=8098M

[Libraries]
Cairo=libcairo.so.2.11400.6
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.6
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.803.0
GTK+2=libgtk-x11-2.0.so.0.2400.30
GTK+3=libgtk-3.so.0.1800.9
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.28.0.0
Poppler=libpoppler.so.58.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.5.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6

[Environment]
CLUTTER_BACKEND=x11
CLUTTER_IM_MODULE=xim
COMPIZ_CONFIG_PROFILE=mate
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-l4hOArkBvc,guid=acbd9b2811b5f5bd388bfb12592c3c7b
DEFAULTS_PATH=/usr/share/gconf/mate.default.path
DESKTOP_SESSION=mate
DISPLAY=:0
GB_GUI=gb.qt4
GDMSESSION=mate
GDM_XSERVER_LOCATION=local
GTK_IM_MODULE=ibus
GTK_MODULES=gail:atk-bridge
GTK_OVERLAY_SCROLLING=0
HOME=<home>
LANG=fr_CA.UTF-8
LC_ADDRESS=fr_FR.UTF-8
LC_IDENTIFICATION=fr_FR.UTF-8
LC_MEASUREMENT=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_NAME=fr_FR.UTF-8
LC_NUMERIC=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8
LC_TELEPHONE=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LIBVIRT_DEFAULT_URI=qemu:///system
LOGNAME=<user>
MANDATORY_PATH=/usr/share/gconf/mate.mandatory.path
MATE_DESKTOP_SESSION_ID=this-is-deprecated
MDMSESSION=mate
MDM_LANG=fr_CA.UTF-8
MDM_XSERVER_LOCATION=local
PAPERSIZE=a4
PATH=<home>/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
PWD=<home>
QT4_IM_MODULE=xim
QT_ACCESSIBILITY=1
QT_IM_MODULE=ibus
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
QT_STYLE_OVERRIDE=gtk
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/2333,unix/<hostname>:/tmp/.ICE-unix/2333
SHELL=/bin/bash
SSH_AGENT_PID=2438
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TZ=:/etc/localtime
USER=<user>
USERNAME=<user>
WINDOWPATH=7
XAUTHORITY=<home>/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-mate:/etc/xdg
XDG_CURRENT_DESKTOP=MATE
XDG_DATA_DIRS=/usr/share/mate:/usr/local/share/:/usr/share/:/usr/share/mdm/
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_COOKIE=7799fc85266d4f0d61afdf215179697f-1496071290.556597-1145314354
XDG_SESSION_DESKTOP=mate
XDG_SESSION_ID=c1
XDG_VTNR=7
XMODIFIERS=@im=ibus



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112&from=L21haW4-

Comment #1 by Alexander KUIPER:

What are you trying to achieve here? Normally you can buffer read data in a string value until you reach the LOF or a sort-of end of record marker.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112&from=L21haW4-

Comment #2 by Olivier CRUILLES:

Hello,
Regarding the documentation of libcurl on what gb.net is based, the buffer size can be configured from default value 16kB to 512kB.

I'm developing a process in Gambas to receive more than 100000 Flows/sec (maxi 1464 Bytes per Flow) and split those and retransmit those to 3 others processes over Local Socket. There is to many flows to transmit per second over the Local Socket that the buffer size by default is not enough I guess. This is the only reason that I have found.
Maybe my usage of Socket is not correct.

Official Documentation of libCurl:

SYNOPSIS

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_BUFFERSIZE, long size);
DESCRIPTION

Pass a long specifying your preferred size (in bytes) for the receive buffer in libcurl. The main point of this would be that the write callback gets called more often and with smaller chunks. Secondly, for some protocols, there's a benefit of having a larger buffer for performance.

This is just treated as a request, not an order. You cannot be guaranteed to actually get the given size.

This buffer size is by default CURL_MAX_WRITE_SIZE (16kB). The maximum buffer size allowed to be set is CURL_MAX_READ_SIZE (512kB). The minimum buffer size allowed to be set is 1024.
DEFAULT

CURL_MAX_WRITE_SIZE (16kB)



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112&from=L21haW4-

ADMINISTRATOR changed the state of the bug to: Accepted.




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112&from=L21haW4-

Comment #3 by Benoît MINISINI:

Done in revision #8144.

Benoît MINISINI changed the state of the bug to: Fixed.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112&from=L21haW4-

Comment #4 by Benoît MINISINI:

Remark: it is a libcurl feature. It has nothing to do with gb.net.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

[Gambas Bug Tracker] Bug #1112: Request to add bufferSize configuration into Local Socket - gb.net

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1112&from=L21haW4-

Comment #5 by Olivier CRUILLES:

I will test it soon. Thank you
Olivier



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user