Hello,
I'm building a server to serve my clients and I'm facing some problems
(again).
Each message in my protocol is composed of a PDU that holds an XML content.
Clients may send an arbitrary number of messages at once (that may be
contained in a single TCP packet). When using IoHandler and a
ProtocolDecoder there is no way to produce more than a single message object
(written to the ProtocolDecoderOutput). I can define a "MegaMessage" that
can contain more than one of my messages and then handle this within the
IoHandler.messageReceived method, but I wonder whether there's a better way
of doing this - Is there?
Another issue is that messages may be received in parts (due to network
latency or other network behavior). What is the best way to handle this
behavior? If the solution is using StreamIoHandler then there is an issue
that I still need to report to JIRA, regarding Exception handling of socket
closure (will do that shortly).
Thanks,
Zohar.

Reply via email to