Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Socket IO

15 views
Skip to first unread message

Andrew The

unread,
May 13, 2003, 8:38:33 PM5/13/03
to perl6-internals
Hi Guys,

Finally decided to take the plunge and ask a few questions.

I've been working on some socket functions for parrot. I'm writing a thin layer
over the BSD socket functions. I've gotten to the point where the code is
"useable" . In other words, I've gotten to the point where I can connect to a
server, send data, receive a response and then disconnect.

I'd like a bit of guidance as to what's the official way of doing some things.
I've based most of what I've done on the IO code in the CVS repository. There
are somethings that differ though.

1. How are you supposed to handle constant values ? Should I be hiding them in
a structure or a lookup table or both ?
2. I've been using a doubly linked list to track the data stucture for the
sockets and the addresses. Should this be changed to a different implementation ?
3. To simplify the testing i'm doing (yes there will be unit tests) I've not
integrated the code into the IO files (io.ops, include/parrot/io.h, io/io.c,
...). Should I integrated it before releasing ?

Cheers,

--
Andrew The

Leopold Toetsch

unread,
May 18, 2003, 12:01:36 PM5/18/03
to Andrew The, perl6-i...@perl.org
In perl.perl6.internals, you wrote:
> Hi Guys,

> I've been working on some socket functions for parrot.

Fine, fine.

> 1. How are you supposed to handle constant values ? Should I be hiding them in
> a structure or a lookup table or both ?

I think just defining/documenting and using them should be enough. (s.
e.g. interpinfo or stringinfo, where constants are used)

> 3. To simplify the testing i'm doing (yes there will be unit tests) I've not
> integrated the code into the IO files (io.ops, include/parrot/io.h, io/io.c,
> ...). Should I integrated it before releasing ?

Could you coordinate this with Juergen Boemmels who is working on the IO
layer.

leo

0 new messages