chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Help with udp6 / socket


From: Scott McCoid
Subject: Re: [Chicken-users] Help with udp6 / socket
Date: Mon, 16 Feb 2015 14:06:49 +0100

Hi Christian!

Thanks for the quick help and netcat tip. I was able to send from my script and receive with netcat (for example: nc -u -6 -l 8000) without any problems. (sending to port 8000 in my script)

I've tried doing the reverse situation, where I receive on the script side and send using netcat, but I haven't been able to get this to work. I don't have any errors, but I'm not receiving anything for some reason. 

I'll work on some chicken scripts that talk to each other and see if I can get this to work properly. 

Thanks again for your help!
Scott

On Mon, Feb 16, 2015 at 11:49 AM, Christian Kellermann <address@hidden> wrote:
Hi Scott!

Scott McCnoid <address@hidden> writes:

> I'm reasonably new to chicken-scheme (and scheme in general), and I'm
> having trouble with the udp6 (and likewise, socket) eggs. I'm trying to run
> the example code, but the connection is always refused.
>
> *Error: (socket-receive!) cannot read from socket - Connection refused:
> #<socket fd:4 af/inet sock/dgram>*
>
> I looked into the socket code and it seems that this is probably not the
> fault of these eggs per se, but probably something I'm doing wrong. For
> example, the *%socket-receive!* function makes a call to the <sys/socket.h>
> *recv* function, which always returns -1. I've tried using other port
> numbers to connect to, but this doesn't seem to make a difference.
>
> I'm on Mac OS *10.10.2* using chicken scheme v.* 4.9.0.1 *(stability/4.9.0)
> (rev 8b3189b)
>
> I'm happy to help track this down if it's a bug, just let me know.

The most likely reason is that on Mac OS X there is noone listening on
port 13.

You can check that manually with "nc localhost 13".

The next problem is that noone is actually listening on ipv6 for that
port. I ran into this when trying to simulate the datetime service with:

"date | sudo nc -u -l -p 13"

Connecting with v4 works, with v6 it doesn't.

My suggestion is to test this with a known open service on your system
or by creating a server explicitly bound to a v6 address.

Please don't hesitate to report further issues and troubles!

Kind regards,

Christian

--
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.


_______________________________________________
Chicken-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-users


reply via email to

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