Hi:<br><br>I am not netty expert yet. I am just trying to give some hints. In your case, you are actually building a request/response protocol. And request and response message may include quite complicated headers and body. So you have to do some message encoding and decoding in both server side and client side. You can see in netty codebase there are some out-of-box encoder and decoder in handler.codec package. I suggest you take a look at example.fractorial package to see how to implement your own encoder and decoder for your message format which may be xml. If you are not sensitive to message format, you can also have a look at example.localtime which use google protobuf library as real encoder and decoder.<br>
<br>good luck<br><br>yanky<br><br><br><br><div class="gmail_quote">2009/4/11 manishr22 <span dir="ltr"><<a href="mailto:manishr22@gmail.com">manishr22@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Yanky,<br>
<br>
I took the sample code from svn trunk and saw the codes too. Could you please let me know which one among given sample code will fit for the reference of my requirement.<br>
<br>
Regards,<br>
Manish<br>
<div><div></div><div class="h5"><br>
Hi:<br>
<br>
Of course there are some sample code in netty project. You can just check<br>
out the svn trunk and see some samples in example package.<br>
<br>
good luck<br>
<br>
yanky<br>
<br>
<br>
2009/4/10 manishr22 <<a href="mailto:manishr22@gmail.com">manishr22@gmail.com</a>><br>
<br>
><br>
> Hi,<br>
><br>
> I had a problem statement<br>
><br>
> "to write an asynchronous TCP server to which multiple clients will connect<br>
> and keep sending messages to my tcp server. My server should read the<br>
> message and send back some acknowledgment information to the client who sent<br>
> the data. While reading the data at server since the message comes in<br>
> particular format i have to do some processing before sending the response<br>
> back to client."<br>
><br>
> say my client is sending a message structure in which it has some header<br>
> and then in body it has message like :<br>
><br>
> <manish>welcome to the real world</manish><br>
><br>
> I was on the way to implement NIO but in between i found such a great<br>
> library netty and thought of using it. i was trying to make use of this<br>
> library with the given tutorial and examples but i found that tutorial is<br>
> not good enough to solve the complex problem.<br>
><br>
> If you can provide me some guidance or sample code that how i should solve<br>
> my problem using netty library, that would be great.<br>
><br>
> Thanks in advance.<br>
><br>
> Regards<br>
> Manish<br>
> --<br>
> View this message in context:<br>
> <a href="http://n2.nabble.com/Code-example-to-write-asynchronous-server-tp2615889p2615889.html" target="_blank">http://n2.nabble.com/Code-example-to-write-asynchronous-server-tp2615889p2615889.html</a><br>
> Sent from the Netty User Group mailing list archive at Nabble.com.<br>
><br>
> _______________________________________________<br>
> netty-users mailing list<br>
> <a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
><br>
<br>
_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/Code-example-to-write-asynchronous-server-tp2615889p2617267.html" target="_blank">http://n2.nabble.com/Code-example-to-write-asynchronous-server-tp2615889p2617267.html</a><br>
</font><div><div></div><div class="h5">Sent from the Netty User Group mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
netty-users mailing list<br>
<a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/netty-users" target="_blank">https://lists.jboss.org/mailman/listinfo/netty-users</a><br>
</div></div></blockquote></div><br>