Hi Norman, Sorry for the late response...
On 7/12/07, Norman Maurer <[EMAIL PROTECTED]> wrote: > Hi all, > > I wrote some prototype for streaming mp3 (tcp) to a BARIX device. All works > well so far :-) > > Now I want to get sure that only one stream is send to the device at once. So > I > thought about "pause" the new connection if it comes from the same ip and > resume > it after the "old" connection was closed. > Is it possible todo something like this ? Yes, but I'd just disconnect the old connection because the connection might be a dead one just dangling because of undetected disconnection. Even if you are going to give priority to the old one, I'd disconnect rather than pausing the new connection. > Or should i better use IoSession.setTrafficMask(..) to suspend / resume write > to the device ? Yes, you can. You will have to insert suspendRead() into sessionCreated() for precise traffic control. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
