<div dir="ltr">2013/7/3 IOhannes m zmoelnig <span dir="ltr">&lt;<a href="mailto:zmoelnig@iem.at" target="_blank">zmoelnig@iem.at</a>&gt;</span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div>-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</div><div>On 2013-07-03 17:33, Antoine Villeret wrote:<br>
&gt; so it could be difficult to use a server which doesn&#39;t accept more<br>
&gt; than one connection...<br>
&gt;<br>
<br>
</div>no that&#39;s not what i meant.<br>
you can have as many connections as you want, but they cannot be<br>
maintained at the same time.<br>
<br>
simple example:<br>
- - both clientA and clientB send a a query to the server<br>
- - to complicate things, they do so at exactly the same time<br>
- - but since IP is a serial protocol, they will somehow arrive one<br>
after each other - let&#39;s assume clientB was faster<br>
- - [udpserver] will output the query from clientB<br>
- - if the server-patch now immediately responds to that query, the<br>
response will be sent back to clientB<br>
- - then [udpserver] will output the query from clientA.<br>
- - [udpserver] will forget everything about clientB<br>
- - if the server-patch responds immediately to that query, the response<br>
will be sent back to clientB<br>
- - if you later &quot;send&quot; something from the server, it will still be sent<br>
to clientB (because clientB is the last known connection)<br></blockquote><div><br></div><div>so in this case, if I understand correctly, udpserver never send an answer to clientA ?</div><div>I have to disconnect clientB *before* connecting clientA ?</div>


<div>but how clientA will know this is time to connect ?</div><div>should it try until the connection is accepted ?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>
<br>
so you can have as many &quot;connections&quot; as you want, but they have to be<br>
handled atomically - on after another.<br>
you cannot have clientA and clientB connect to the server, and make<br>
the server send info to both simultaneously.<br>
instead you have to adapt a query/response scheme, where each client<br>
asks the server for piece of information.<br></blockquote><div><br></div><div>this what I&#39;m doing now, the client connects then ask for something and when it receive the answer it disconnects</div><div>if there is no answer it disconnect after xx second</div>


<div><br></div><div>concerning [udpserver], I try to reproduce the scenario above with your github&#39;s version :</div><div>I start 3 pd : one with udpserver-help.pd, and the 2 other with udpclient-help.pd</div><div><br>

</div><div>I connect the clientA, send some data, the server receives them and the server sends back something else to the client</div><div>then I disconnect the clientA and connect clientB, but when clientB tries to send data I got in the pd console on server side :</div>

<div>[udpserver] received disconnection event<br></div><div>and in the command line : </div><div><div>iemnet:sender-shutdown: Transport endpoint is not connected</div></div><div><br></div><div>and on the client side, in the terminal I got : </div>

<div>iemnet:sender-shutdown: Bad file descriptor<br></div><div><br></div><div>I know &quot;[udpserver] does not work yet&quot; but as we are talking about it, I want to try your version</div><div>I just file a report for that<br>

</div><div><br></div><div>thanks for all</div><div><br></div><div>antoine</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div><br>
fgamsdr<br>
IOhannes<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.12 (GNU/Linux)<br>
Comment: Using GnuPG with Icedove - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
<br>
</div>iEYEARECAAYFAlHUSAkACgkQkX2Xpv6ydvQ7dQCfWd6Ms++xbvpFYHMUArPILPeA<br>
fA8AoOo0uQuuQnJV5FBafbRsggXOqtzx<br>
=29SY<br>
<div><div>-----END PGP SIGNATURE-----<br>
<br>
_______________________________________________<br>
Pd-dev mailing list<br>
<a href="mailto:Pd-dev@iem.at" target="_blank">Pd-dev@iem.at</a><br>
<a href="http://lists.puredata.info/listinfo/pd-dev" target="_blank">http://lists.puredata.info/listinfo/pd-dev</a><br>
</div></div></blockquote></div><br></div></div>