[PD-dev] socket gurus
august
august at alien.mur.at
Tue Mar 2 16:26:11 CET 2004
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.
More information about the Pd-dev
mailing list