| Store | Cart

Re: [TCLCORE] TIP #468: Support Passing TCP listen Backlog Size Option to TCP Socket Creation

From: Harald Oehlmann <hara...@elmicron.de>
Mon, 10 Apr 2017 11:42:58 +0200
Am 09.04.2017 um 13:22 schrieb Alexandre Ferrieux:
> On Sun, Apr 9, 2017 at 12:35 PM, Shannon Noe> <shan...@flightaware.com> wrote:>>>>  TIP #468: SUPPORT PASSING TCP LISTEN BACKLOG SIZE OPTION TO TCP SOCKET CREATION>> =================================================================================>>  A *Tcl_OpenTcpServerEx* function will be changed to add a /backlog/>>  parameter with this signature:>>>>        Tcl_Channel *Tcl_OpenTcpServerEx*(Tcl_Interp */interp/, const>>        char * /service/, const char */myHost/, unsigned int /flags/, int>>        /backlog/, Tcl_TcpAcceptProc */acceptProc/, ClientData>>        /acceptProcData/)> > Hum, you're right, it's unfortunate that the recent creation of> Tcl_OpenTcpServerEx (TIP #456) was shy enough to only add a bitmask> (flags), leaving no room for things like the listen() argument.> Good job ; let's do it quickly, to minimize the incompatibility window ;)> > -Alex> > PS: it would be cool to be sure there is no other popular tweak> lurking in the dark until this one goes final :)


Alex,
thank you for asking about "additional needs". When reworking the win
socket, there was the need of some test flags:

In 2014, I wanted to add some tests in the internals of a socket and
needed to pass that information.
The result was branch: robust-async-connect-tests
https://core.tcl.tk/tcl/timeline?r=robust-async-connect-tests&nd&c=2014-07-17+09%3A53%3A36&n=200

which never found its way into trunk.

I think, things might be easier, if there would be test modes flags
available for the socket calls, instead using the method here to access
directly the socket array.

The corresponding thread on the core list was titled "How to pass a test
flag to the socket channel driver?", with the key post by Donal:

Am 15.07.2014 um 12:44 schrieb Donal K. Fellows:
> On 14/07/2014 14:32, Harald Oehlmann wrote:>>   (1) + (2) : no go IMHO -> no way to set a flag in driver by C>> What? No! Tcl_GetChannelInstanceData() will return a handle to the> per-instance type-specific structure, which the test code will know the> type of and so be able to poke around inside. You'll have to be careful> with threads if you're doing complicated messing around with them, but> otherwise you'll be just fine.>> Donal.

So, this might be a condidate ?

Thank you,
Harald

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Core mailing list
Tcl-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-core

Recent Messages in this Thread
Shannon Noe Apr 09, 2017 10:35 am
Alexandre Ferrieux Apr 09, 2017 11:22 am
Harald Oehlmann Apr 10, 2017 09:42 am
Jan Nijtmans Apr 10, 2017 12:44 pm
Harald Oehlmann Apr 10, 2017 01:34 pm
Alexandre Ferrieux Apr 10, 2017 09:32 pm
Messages in this thread