chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: udp.scm


From: Daishi Kato
Subject: [Chicken-users] Re: udp.scm
Date: Sun, 03 Apr 2005 10:38:53 +0900
User-agent: Wanderlust/2.11.30 (Wonderwall) Emacs/21.4 Mule/5.0 (SAKAKI)

I made a small change:

8<------8<------8<------8<------8<------8<------8<------8<------

--- udp.scm.orig        2004-03-25 05:03:46.000000000 +0900
+++ udp.scm     2005-04-03 09:23:15.000000000 +0900
@@ -284,7 +284,7 @@
              (##sys#thread-block-for-i/o! ##sys#current-thread fd i/o)
              (yield)
              (restart-nonblocking name fd i/o thunk))
-            (else (##net#error name))))))
+            (else (##net#error name errno))))))
 
 
 ;;; io:event-dispatch : slist timeout-secs timeout-usecs -> bool

8<------8<------8<------8<------8<------8<------8<------8<------

which got me know the error is "Connection refused".
I don't know why the connection is refused
and am not sure if this is udp.scm related problem.

There also seems some problems in the non-blocking operation,
but I don't think it has something to do with
the "Connection refused" problem.

Any other help would be appreciated.

Daishi


At Sat, 02 Apr 2005 11:21:17 +0900,
Daishi Kato wrote:
> 
> Hi,
> 
> I'm very new to the scheme and CHICKEN,
> and trying to use udp.scm.
> 
> The example code just gives me:
> 
> 8<------8<------8<------8<------8<------8<------
> 
> Version 1, Build 63 - linux-unix-gnu-x86
> (c)2000-2004 Felix L. Winkelmann
> #;> (require 'udp)
> ; loading /usr/local/lib/chicken/udp.so ...
> #;> (define s (udp-open-socket))
> #;> (udp-bind! s #f 0)
> #;> (udp-connect! s "localhost" 13)
> #;> (udp-send s "\n")
> 1
> #;> (receive (n data from-host from-port) (udp-recvfrom s 64) (print* n " 
> bytes from " from-host ":" from-port ": " data))
> Error: recvfrom
> 
> 8<------8<------8<------8<------8<------8<------
> 
> Would somebody figure out what is wrong with it?
> Any clue to debug this kind of error would also help.
> 
> Thanks,
> Daishi




reply via email to

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