SYN/ACK delays and 139/445

tridge at samba.org tridge at samba.org
Fri Oct 28 01:52:52 GMT 2005


Volker,

 > Replying to myself, I've chosen some defaults: flags = 0, only stream
 > sockets and no name resolution. Attached find the untested
 > lib/socket/connect_multi.c proposal.

yep, I think you are right about making it specific to stream
sockets. I'd even be happy to make it specific to ipv4, and expand it
to other domains if/when the need arises.

If you want to keep the domain, then maybe call it 'socket_domain'
instead of 'name' ? When I started reading your code I wondered what
the 'name' argument was in socket_connect_multi_send(), and only
worked it out by seeing it passed to socket_create(). I know you were
just being consistent with what socket_create() uses as its argument,
but perhaps we should change that as well :-)

Other comments: (mostly minor!)

 - using a NULL context in the talloc_zero() at the start of
   socket_connect_multi_send() should be avoided. That means we'll
   need a mem_ctx argument to socket_connect_multi_send().

 - if you are using talloc_zero() to create the ctx, then why do?
	result->async.fn = NULL;

 - the socket_create() and socket_connect() code in
   socket_connect_multi_send() is really just a duplicate of
   connect_multi_fire_next(). Why not just call
   connect_multi_fire_next() from within socket_connect_multi_send()
   to set off the first connect? You could either pass a NULL 'te', or
   pull the core out of connect_multi_fire_next() into a separate
   function that takes the state instead of the void*.

 - why pre-declare prototypes for connect_multi_connect_handler() and
   connect_multi_fire_next()? Might be better to just put the _send()
   and _recv() functions at the bottom of the file.

Cheers, Tridge


More information about the samba-technical mailing list