I'm working on a streaming server using Mina, there are
two types of packets in my server: the control messages that's short but with
higher priority, and the media packets that's big but with lower priority. I
know inside mina there's a message queue maintained for written messages, so
that the write request can return immediately. This makes thing pretty bad: if
I
want to write a control message, the queue is filled with media data and the
control message is sent until all media data is flushed.
So I'm expecting a method like:
IoSession.write(IoBuffer message, int priority). For the remaining messages in
the queue, the ones with lower priority always get sent before the ones with
higher priority. Does anyone know there be some package can help me do this? Or
do I need to override an existing Mina class - maybe NioProcessor?
Thanks and best regards
Wei
_________________________________________________________________
约会说不清地方?来试试微软地图最新msn互动功能!
http://ditu.live.com/?form=TL&swm=1