[mercury-users] Sockets (again).

Thomas Charles Conway conway at hydra.cs.mu.oz.au
Thu Feb 11 08:52:02 AEDT 1999


On Thu, Feb 11, 1999 at 02:31:49AM EST, Ralph Becket wrote:
> I've been thinking about adding sockets functionality to the io
> library at long last, but there was some disussion hinting that this
> may already have been done.  If so, pls. let me know so I don't
> reinvent the wheel.  Otherwise I've printed out the exchange between
> Fergus and Paul Massey from Feb last year and plan to go from there.

One thing to consider is to what extent adding sockets overlaps with
adding POSIX IO support. It'd be good if the sockets library were
one piece of the POSIX library, which isn't to say I'm suggesting
to need to do a whole POSIX library just to do sockets, but that
the design of the sockets library should make it easy to integrate
with a more complete POSIX interface.

One problem with a POSIX compatible interface is that quite a lot
of the functions use "char *" arguments to represent not strings,
but byte vectors. Because the current implementation uses a \0
terminated representation for strings, they won't work in this
instance, not to mention the fact that read() updates its argument.
I have a skeleton module `text.m' which implements byte-vectors.
If you're interested I can forward it to you.

Thomas
-- 
Thomas Conway <conway at cs.mu.oz.au> )O+
To a killer whale, otters are like hairy popcorn -- Paul Dayton



More information about the users mailing list