[PD-dev] starting pd from tcl

0001 0001 at ooo000ooo.org
Sun Aug 29 18:33:51 CEST 2004


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 at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-dev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1494 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20040829/3092697d/attachment.bin>


More information about the Pd-dev mailing list