Hi All,
I got a strange problem with MessageParserFilter with Grizzly 2.0.
My procotol is:
<STX><BODY><ETX>
I follow the sample source code under
org\glassfish\grizzly\samples\filterchain. The test NIO server just stop
reading / parsing after first (or sometime second) completed message.
However, if I sleep 10 millis at client side between sending message. It
works.
Please help.
writer = connection.getStreamWriter();
// Enable standalone mode for this connection
// (don't use Filter chains or other I/O event processors)
connection.setProcessorSelector(new StandaloneProcessorSelector());
for (int i = 0 ; i < 50 ; i++) {
TestMessage sentMessage = new TestMessage();
byte body[] = new String("Test Message Number : " + i).getBytes();
sentMessage.setBody(body);
writeTestMessage(writer, sentMessage);
// need to sleep a while, otherwise server will stop reading after first
completed message??
Thread.sleep(2L);
}
http://www.nabble.com/file/p23728698/src.zip src.zip
--
View this message in context: http://www.nabble.com/Grizzly-2.0-MessageParserFilter-Problem-tp23728698p23728698.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.