--- pd-0.37-0/src/x_net.c 2003-03-21 07:36:20.000000000 +0100 +++ pd-0.37-0-x/src/x_net.c 2003-12-22 09:51:49.547469488 +0100 @@ -249,11 +249,11 @@ } static void *netreceive_new(t_symbol *compatflag, - t_floatarg fportno, t_floatarg udpflag) + t_floatarg fportno, t_floatarg udpflag, t_floatarg loflag) { t_netreceive *x; struct sockaddr_in server; - int sockfd, portno = fportno, udp = (udpflag != 0); + int sockfd, portno = fportno, udp = (udpflag != 0), lo = (loflag != 0); int old = !strcmp(compatflag->s_name , "old"); int intarg; /* create a socket */ @@ -267,7 +267,7 @@ return (0); } server.sin_family = AF_INET; - server.sin_addr.s_addr = INADDR_ANY; + server.sin_addr.s_addr = (lo ? INADDR_LOOPBACK : INADDR_ANY); #if 1 /* ask OS to allow another Pd to repoen this port after we close it. */ @@ -352,7 +352,7 @@ netreceive_class = class_new(gensym("netreceive"), (t_newmethod)netreceive_new, (t_method)netreceive_free, sizeof(t_netreceive), CLASS_NOINLET, A_DEFFLOAT, A_DEFFLOAT, - A_DEFSYM, 0); + A_DEFFLOAT, A_DEFSYM, 0); } void x_net_setup(void)