Hi Jeanfrancois,
attached you find an update of CustomProtocolParser.java.
Could you please delete AbstractCustomProtocolParser.java
Actually it is a complete Client Server Example using a Custom Protocol
build with Grizzly Framework.
For a "silly" Demo see Example_1_Server.java and Example_1_Client.java
Behind the scenes a Custom Protocol is implemented which is a little bit
like GIOP (laugh just some ideas which led to RequestMessage,ReplyMessage,FragmentMessage)
For Client Server Communication only one open Connection is needed. A client inits
a Connection (firewall friendly) but the server can send messages at any time to any client.
All writes are done with AsyncWriter which means that always a full message is send
from Endpoint to Endpoint
But since Message Size is fixed 8192 bytes, bigger logical data gets fragmented to
FragmentMessages the Connection should be very responsive.
The fixed 8192 size also should be nice to memory when large data amounts are send.
Hopefully this protocol and supporting classes are general purpose enough
so that somebody needing such a protocol can easly plug into the samples
I tested the classes and everything works but still have some work todo.
(for example your favorite theme avoiding memory leak when attaching to selectionKey,
further docs,ssl,nicer examples, something like suspendableFilter)
Many Greetings
John
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
- application/x-zip-compressed attachment: com.zip