packet_* => tstream glue

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Nov 4 15:34:29 MST 2009


On Thu, Nov 05, 2009 at 09:25:47AM +1100, Andrew Bartlett wrote:
> On Wed, 2009-11-04 at 23:07 +0100, Volker Lendecke wrote:
> > On Thu, Nov 05, 2009 at 08:39:43AM +1100, Andrew Bartlett wrote:
> > > The use of 'send' and 'recv' in the tsocket code is really quite
> > > confusing.  In this case, it means 'start' and 'conclude' (or 'finish')
> > > the asynchronous operations, rather than to send() and recv() packets. 
> > > 
> > > Would it be at all possible to change those names?  It really bends the
> > > mind a bit too much.
> > 
> > Please don't. tsocket_recv_send and tsocket_recv_recv is
> > indeed confusing, but all the other async functions use
> > _send and _recv. 
> 
> Which I think shows that, while it makes sense for 'send and recv' a
> packet, that is is a really poor choice of naming pattern for a general
> infrastructure. 
> 
> > With the async functions you usually don't
> > use these low-level direct async counterparts of the sendto
> > and recvfrom syscalls much anyway, in Samba3 we mostly use
> > the writev and read_packet which are much more powerful.
> 
> I still disagree that the pattern justifies such a ridiculous name.  Do
> you have any other suggestions?  I really think what we have now is
> impossible to explain to others. 

vlendec at sam[SerNet]:~/git/s3-work/source4 > git grep _send\( | wc -l
1374

Enjoy re-writing them all in Samba4 first :-))

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091104/07e5a5dc/attachment.pgp>


More information about the samba-technical mailing list