guile-user
[Top][All Lists]
Advanced

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

Setup a sockaddr


From: Manuel Giraud
Subject: Setup a sockaddr
Date: 03 Aug 2001 11:13:09 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

I'm trying to program a simple client/server in Guile as exercise (to
learn how to use socket with it).

But, I'm not able to construct a sockaddr object. I was looking for
something beauti-guily-ful like:

        (define sa (sockaddr AF_INET (inet-aton "127.0.0.1") portnum))

but, i don't find it :-(. So I try using a vector directly: 

        (define sa (make-vector 3))
        (vector-set! sa 0 AF_INET)
        (vector-set! sa 1 (inet-aton "127.0.0.1"))
        (vector-set! sa 2 portnum)

but guile complains about a forth field in sa.

-- 
"Never imagine yourself not to be otherwise than what it might appear
to others that what you were or might have been was not otherwise than
what you had been would have appeared to them to be otherwise"
  The Duchess

_Manuel Giraud_



reply via email to

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