ok this seems to solve the problem with the socket in s_inter.c
#ifdef MACOSX if (setsockopt(xsock, SOL_SOCKET, SO_REUSEADDR, &intarg, sizeof(intarg)) < 0) post("setsockopt (SO_REUSEADDR) failed\n"); #endif
(I wonder if it would affect anything else)
so now the port is available when closing pd ... I don't know how bad it is to depend on this particular port
. g
El 29/08/2004, a las 16:43, 0001 escribió:
hi all. I'm trying to find a more reliable way of starting pd on OSX from AppMain.tcl currently, I depend on pd being able to listen to the default port (5400). pd usually gets to bind to this port except if somebody else is using it. This can be detected in Tcl using netstat.
But if you quit pd, the port is unusable for some time and won't show up in netstat.
So It seems I need either a way to detect the usability of the port in Tcl (trying to make a server socket won't report any error) or a clean way for pd to tell the Tcl code which port it has picked
any advice on this would be welcome.
... gerard
PD-dev mailing list PD-dev@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-dev