[PD-dev] socket gurus
Tom Schouten
doelie at zzz.kotnet.org
Tue Mar 2 17:00:22 CET 2004
hi august,
check man 2 connect:
ETIMEDOUT
Timeout while attempting connection. The server may be too
busy to accept new connections. Note that
for IP sockets the timeout may be very long when syncookies
are enabled on the server.
so you're better off using select, then you can set your own timeout.
tom
On Tue, 2 Mar 2004, august wrote:
>
> I'm now trying to brush up my external for reading different sound
> formats. One problem I am having is with sockets though.
>
> I use a normal connect() command like this:
>
> if ( connect (fd, (struct sockaddr *) &server, sizeof (server)) < 0 ) {
> post("Couldn't connect");
> close(fd);
> return (-1);
> }
> post("connected to server");
>
>
> but I noticed that when I try to connect to the wrong port of servers that
> exist, the app will hang indefinitly trying to connect. I never get a
> response at all.
>
> for example if I connect to http://66.28.68.70:8000/puredata.ogg and
> nothing is there at that server on that port, it returns non-0 with an
> error and everything is fine.
>
> But, if I try to connect with http://66.28.68.70:3200/puredata.ogg, it
> hangs completely.
>
> Olaf, I am looking at your code a lot to do the connect and http commands
> and noticed that this bug also affects your code. Try connecting to
> http://66.28.68.70:3200/anymount
>
>
> any hints? would it be better to use bind somehow?
>
> thanks -august.
>
>
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-dev
>
More information about the Pd-dev
mailing list