chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] chickenlib


From: tonyg
Subject: Re: [Chicken-users] chickenlib
Date: Fri, 9 Aug 2002 16:23:02 +0100
User-agent: Mutt/1.2.5i

Hi...

> 1) I think "bind-unix", "bind-inet" etc. are mistakes. In the manner
>    of Scsh's interface, things that map more straightforwardly into
>    the underlying Unix calls are likely of use. See:
>    http://www.scsh.net/docu/html/man-Z-H-5.html#%_chap_4
>    I think that some of the design choices in the Scsh interface are a
>    mistake, but having a straightforward bind etc. is not.

You're right. Okay, then: users of socket.scm are hereby warned that
it is about to be gutted and replaced :-) and to use plt-net.scm if
they'd rather have a stable interface!

> 2) It would be good to have abstract types that encapsulate a sockaddr
>    style structure and functions to manipulate that. Similarly for
>    things we might dub "inaddr4", "inaddr6", and "localaddr" (though
>    perhaps we don't need the last as it is really just a string.)
>    By doing this, we can handle the range of available calls more
>    nicely. Scsh goes some of the way in this direction but not far
>    enough.

Right. Okay.

Maybe I'll change it to have (define-record)s for sockaddr_in- and
sockaddr_un-equivalents, with conversion procedures
(inaddr4->sockaddr), (unix-addr->sockaddr) etc. to convert to a
bytevector suitable for use with a lowlevel call like bind?

I'll think about this some more, and with it a bit over the weekend.

> 3) I think the names should probably be simply the names of the
>    underlying Unix system calls, which is mostly what you do, rather
>    than the altered names in scsh.

Okay. Good idea not to gratuitously rename things I suppose.

Thanks for the suggestions!

Tony
-- 
Monkeys high on math -- some of the best comedy on earth
        - Tom Lord, regarding comp.lang.scheme



reply via email to

[Prev in Thread] Current Thread [Next in Thread]