Hello.
Bauce wrote:
> I get a beginner question on libsocket: suppose that I define a socket
> (non-blocking, if this matters).
There should be no difference in limit between blocking and non-blocking
sockets.
> I use listen() and accept() on it for incoming connections from the
> network. What is the limit of the 'backlog' parameter I can provide to
> the lsiten()?
This will depend on the version of Winsock that you have, because
libsocket works in different ways, depending on the Winsock version.
If you have Winsock 1.1, which ships with Windows '95, then I do not
actually know. I think it may be measured in the hundreds.
Winsock 2 ships with Windows '98, but Windows '95 can also be upgraded to
use it. With Winsock 2, libsocket uses an interface that will be limited
to 32 sockets (actually, I think this will be 31). Try to set the backlog
higher than this may actually cause a crash, although I haven't tested for
it.
How many connections do you want to listen for? I think a backlog of 5 is
usually used.
> Is it linked with the "FILES=" DOS parameter?
No, the socket handles aren't related to DOS file handles.
Hope this helps, bye,
--
Richard Dawe
[ mailto:richdawe@... | http://www.bigfoot.com/~richdawe/ ]