packet_* => tstream glue
Andrew Bartlett
abartlet at samba.org
Wed Nov 4 15:47:53 MST 2009
On Wed, 2009-11-04 at 23:34 +0100, Volker Lendecke wrote:
> 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 :-))
Sure - as I said, where they represent the send() and recv() of packets,
it makes a lot of sense. But where there is no longer a resonable
mapping to the concept of send() and recv() as understood in unix
systems programming then the name is no longer a good choice.
There may be parts of Samba4 that indeed do need such a rename as well.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091105/596538bd/attachment.pgp>
More information about the samba-technical
mailing list