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

Re: Please update SRFI-106

This page is part of the web mail archives of SRFI 106 from before July 7th, 2015. The new archives for SRFI 106 contain all messages, not just those from before July 7th, 2015.

Takashi Kato scripsit:

> The macros came after the constants and I wanted to hear opinions
> but unfortunately I haven't heard anything until now. However I
> think it's nice to have both for people who are familiar with C
> socket programming and who aren't.

I think that C programmers shouldn't have much trouble either way:
(address-family inet) and *af-inet* both look pretty close to AF_INET.
The macros have the advantage that it's possible to check at compile
time that the value being passed in is valid, which is not possible with
the variables.

> > 2) There is no meaningful support for UDP.  I think a socket API
> > shouldn't ignore UDP.
> I think POSIX SOCK_DGRAM is for UDP socket (correct me if I'm wrong)
> and the SRFI is supporting it.

You can use bound UDP sockets with this API, but not unbound ones:
for those you need access to sendto() and recvfrom().  See

John Cowan        http://ccil.org/~cowan   cowan@xxxxxxxx
Lope de Vega: "It wonders me I can speak at all.  Some caitiff rogue
did rudely yerk me on the knob, wherefrom my wits yet wander."
An Englishman: "Ay, belike a filchman to the nab'll leave you
crank for a spell." --Harry Turtledove, Ruled Britannia