bug in tcp/ip on windows?
Valentin Mesaros
valentin at info.ucl.ac.be
Thu Nov 24 09:37:16 CET 2005
Sorry for not playing mutch attention yesterday night ;-), you indeed did=
=20
post a sample code.
I don't have the possibility to run your code right now, but it looks OK=20
to me. I will give it a try on Windows this evening.
I would like to comment a bit on your first mail, see below:
You say that Mozart is limited when it comes to the backlog parameter.
Actually, what you're using is a high level API for socket operations,
i.e., the class Open.socket. This class is a simple, and thus not that
flexible abstraction of the whole socket operations one could imagine. So,
you're right saying that Open.socket does not offer you the possibility to
specify the backlog parameter.
Nevertheless, for more advanced operations on sockets, one would use the
OS module (see Chapter 20 Operating System Support: OS from=20
http://www.mozart-oz.org/documentation/system/node55.html). There one can=
=20
find correspondence to most of the Unix operations such as listen, bind,
sendTo, receiveFrom. So, one does have the possibility in Mozart to
specify the queue length for sockets waiting to be accepted.
So, one idea would be to rewrite your socket interaction by using the
OS module, and see what would its flexibility bring to you.
Cheers,
Valentin
On Thu, 24 Nov 2005, [UTF-8] Filip Konvi=C4=8Dka wrote:
> Valentin Mesaros (24.11.2005 0:11):
> > Dear Filip,
> >=20
> > I am not an expert in Windows, but since as far as I know you're the=20
> > first who reports this kind of problem, I would suggest that we first=
=20
> > start with simple things.
> >=20
> > So, could you send us the code that reproduces the problem.
> >=20
> > Cheers,
> > Valentin
>=20
> Hi, thanks for reply. Please see my first post for the code snippet=20
> (it's at the bottom of the message).
>=20
> As for my previous post regarding send() vs. write(), it seems that=20
> Windows really reports "Bad file descriptor" when write() or read() is=20
> used on a socket, but the message is not "Bad filedescriptor" (i.e.=20
> without the space - which is what Mozart says). Moreover, using write()=
=20
> on a socket seems to *always* fail, which is not exactly what I observe.
>=20
> Cheers,
> Filip
>=20
> _________________________________________________________________________=
________
> mozart-hackers mailing list mozart-hackers at ps.u=
ni-sb.de =20
> http://www.mozart-oz.org/mailman/listinfo/mozart-hackers
>=20
More information about the mozart-hackers
mailing list