Hello,
I have two problems with [tcpserver] from iemnet :
doesn't start. I have to quit again and relaunch again to see the server running.
What i would like : When the patch running the [tcpserver] quit, I relaunch the patch and want the server start. Is it possible ? Thanx. ++
Jack
This may be more to do with the opersting system and how sockets are allocated and buffered than Pure Data.
How you close the patch may make a difference. Try gracefully closing, by disconnecting sockets, then after a short delay exit Pd
They should be usable the next time you open.
You say they refuse to disconnect? Can you throw any more light on that?
Andy
On Wed, Feb 15, 2012 at 07:10:03PM +0100, Jack wrote:
Hello,
I have two problems with [tcpserver] from iemnet :
- when i send the message 'disconnect', clients stay connected.
- when i quit the patch running [tcpserver] and relaunch it, the
server doesn't start. I have to quit again and relaunch again to see the server running.
What i would like : When the patch running the [tcpserver] quit, I relaunch the patch and want the server start. Is it possible ? Thanx. ++
Jack
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Le 15/02/2012 19:53, Andy Farnell a écrit :
This may be more to do with the opersting system and how sockets are allocated and buffered than Pure Data.
How you close the patch may make a difference. Try gracefully closing, by disconnecting sockets, then after a short delay exit Pd
They should be usable the next time you open.
You say they refuse to disconnect? Can you throw any more light on that?
Andy
On Wed, Feb 15, 2012 at 07:10:03PM +0100, Jack wrote:
Hello,
I have two problems with [tcpserver] from iemnet :
- when i send the message 'disconnect', clients stay connected.
- when i quit the patch running [tcpserver] and relaunch it, the
server doesn't start. I have to quit again and relaunch again to see the server running.
What i would like : When the patch running the [tcpserver] quit, I relaunch the patch and want the server start. Is it possible ? Thanx. ++
Jack
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hello Andy and thanx for your answer,
I have omitted to write some useful information about my configuration : Ubuntu 11.04 Pd 0.42.6 iemnet [tcpclient] and [tcpserver] compiled on Jan 23 2012 at 12:35:32
I tried to close the patch gracefully by disconnecting socket first and then quit Pd after few seconds but when i relaunch both patchs it still doesn't work : it is impossible to connect the client to the server.
The two patchs are attached. ++
Jack
Hi Jack
Hello Andy and thanx for your answer,
I have omitted to write some useful information about my configuration : Ubuntu 11.04 Pd 0.42.6 iemnet [tcpclient] and [tcpserver] compiled on Jan 23 2012 at 12:35:32
I have almost the same setup (Pd 0.43.1, iemnet compiled on 2012-02-02). I cannot reproduce your first problem. Disconnecting clients from the server works fine with your patch here.
I tried to close the patch gracefully by disconnecting socket first and then quit Pd after few seconds but when i relaunch both patchs it still doesn't work : it is impossible to connect the client to the server.
I have that as well, but it seems it is not specific to iemnet's classes. I experience that with many net classes in Pd and also - IIRC - with other programming languages that provide ways to open a listening socket. On my box it is a matter of seconds until the bind address is freed. On an earlier Debian installation, it was often a matter of minutes (for instance, when the netpd server crashed), which was more annoying. I haven't figured out a way to avoid this.
Roman
Le 15/02/2012 23:13, Roman Haefeli a écrit :
Hi Jack
Hello Roman,
Hello Andy and thanx for your answer,
I have omitted to write some useful information about my configuration : Ubuntu 11.04 Pd 0.42.6 iemnet [tcpclient] and [tcpserver] compiled on Jan 23 2012 at 12:35:32
I have almost the same setup (Pd 0.43.1, iemnet compiled on 2012-02-02). I cannot reproduce your first problem. Disconnecting clients from the server works fine with your patch here.
Yes, you are right, it was a mistake.
I tried to close the patch gracefully by disconnecting socket first and then quit Pd after few seconds but when i relaunch both patchs it still doesn't work : it is impossible to connect the client to the server.
I have that as well, but it seems it is not specific to iemnet's classes. I experience that with many net classes in Pd and also - IIRC - with other programming languages that provide ways to open a listening socket. On my box it is a matter of seconds until the bind address is freed. On an earlier Debian installation, it was often a matter of minutes (for instance, when the netpd server crashed), which was more annoying. I haven't figured out a way to avoid this.
OK, so if my server quit or crash, I have to wait few minutes (maybe only one) before to relaunch it. I was hoping it was faster. ++
Jack
Roman
On 02/15/12 23:19, Jack wrote:
OK, so if my server quit or crash, I have to wait few minutes (maybe only one) before to relaunch it. I was hoping it was faster.
you can also launch the server and keep setting the port to the desired one (using [port 12345( ) until it reports that it is indeed using that port.
gsmd IOhannes
On Thu, 2012-02-16 at 13:53 +0100, IOhannes m zmölnig wrote:
On 02/15/12 23:19, Jack wrote:
OK, so if my server quit or crash, I have to wait few minutes (maybe only one) before to relaunch it. I was hoping it was faster.
you can also launch the server and keep setting the port to the desired one (using [port 12345( ) until it reports that it is indeed using that port.
Ah, I didn't know about that. If I am not mistaken, this part is missing in the help-file. I'll add it.
As a work-around, I used to use some bash script to make sure the specified port is free before launching Pd. However, an in-patch solution is _much_ nicer. Cool!
Roman
Le 16/02/2012 13:53, IOhannes m zmölnig a écrit :
On 02/15/12 23:19, Jack wrote:
OK, so if my server quit or crash, I have to wait few minutes (maybe only one) before to relaunch it. I was hoping it was faster.
you can also launch the server and keep setting the port to the desired one (using [port 12345( ) until it reports that it is indeed using that port.
gsmd IOhannes
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
It is working perfectly with the message 'port XXXXX'. Thanx IOhannes. ++
Jack
On 02/15/12 23:13, Roman Haefeli wrote:
I have that as well, but it seems it is not specific to iemnet's classes. I experience that with many net classes in Pd and also - IIRC - with other programming languages that provide ways to open a listening
the problem is, that the socket does get not closed properly by Pd. this is due to the "feature" of Pd, that it doesn't call the free-method (destructor) of an object, is you just "quit" Pd. (if you explicitely delete the object, the free-method is called just fine; but not if you just do a [; pd quit(; see also my bug-report/patch about this on sf ( which seems to be down currently)
if the socket does not get closed properly, the OS will free it after some timeout.
socket. On my box it is a matter of seconds until the bind address is freed. On an earlier Debian installation, it was often a matter of minutes (for instance, when the netpd server crashed), which was more annoying. I haven't figured out a way to avoid this.
the only way to avoid this, is to properly close the socket on exit.
depending on your OS, you can modify the timeout, in order to shorten your re-launch times.
on linux, try something like # echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
mfgdasr IOhannes
On 02/16/12 17:13, IOhannes m zmölnig wrote:
fine; but not if you just do a [; pd quit(; see also my bug-report/patch about this on sf ( which seems to be down currently)
it's up again, so here is the ticket: http://sf.net/tracker/index.php?func=detail&aid=1502860&group_id=557...
fgmadrs IOhannes
On Feb 16, 2012, at 11:46 AM, IOhannes m zmölnig wrote:
On 02/16/12 17:13, IOhannes m zmölnig wrote:
fine; but not if you just do a [; pd quit(; see also my bug-report/patch about this on sf ( which seems to be down currently)
it's up again, so here is the ticket: http://sf.net/tracker/index.php?func=detail&aid=1502860&group_id=557...
I included it in Pd-extended 0.43. So far, so good. Doesn't seem to change quit times. I tried some really big patches.
.hc
"We have nothing to fear from love and commitment." - New York Senator Diane Savino, trying to convince the NY Senate to pass a gay marriage bill