Am 15.06.2005 um 09:20 schrieb Stephen Deasey:
In the process of cleanup, we might rectify/improve this and
give the calls more meaningful names.
Hmm, I don't think this naming scheme is clarifying things. The
situation is that Ns_SockListenRaw() does not in fact listen. It call
down to Ns_SockBindRaw() which does not in fact bind...
As I already said above... it is not very meaningful but it follows
the
first bind, then listen
for *all* types of sockets. So no matter what socket you use, you
might want to bind to the socket (yes, privlieged operation)
then listen. The current listen calls are already clever to
honour the pre-binded sockets and use them, binding only
when needed. So, technically speaking you do not need the
explicit bind, or?
I think we have to assume that programmers who need to use UDP and raw
sockets have some idea of how they work. Pretending that they listen
and/or bind is probably just going to confuse them.
If you look at it from that angle, then yes.
Isn't bind() the privileged call here, not listen? I think the hash
look-up needs to be pushed down into the bind calls. Then ListenUdp
and BindRaw can be dropped. And ListenUnix still needs a backlog
arg...
I will check this (havent thought much about the real functionality
while unifiying call-names, as said before).
Oh, and Ns_SockListenUnix(char *path) is yet another thing that won't
work with the Tcl VFS... :-)
I have no problem with that. The fact is that most people also need temp
directories and those must be somewhere on the filesystems, like pipes,
unix-domain sockets and stuff like that. The VFS should really aid in
getting the software distribution simpler to a greater extent. The
ultimative is to pack everything (I mean *everything*) into a monolit
file and distribute this file only (starkit). But, during the *runtime*
things are going to be done in the native filesystem (the example avove,
the temporary directory, loading shared librarries, etc etc).
So, I'm heaading slowly towards "being able to pack everything". One of
the steps I see on the road ahead is "package req NaviServer" which
would
make us just-another-tcl-extension which everybody could use.
Zoran