Thanks a lot, Lee !<div><br></div><div> -- Sébastien<br><br><div class="gmail_quote">2010/11/3 ljohnston <span dir="ltr"><<a href="mailto:johnstlr@yahoo.co.uk">johnstlr@yahoo.co.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Assuming your messages only go from client to server then your client needs a<br>
StringEncoder and the server needs to combine DelimiterBasedFrameDecoder and<br>
StringDecoder. For example<br>
<br>
client<br>
<br>
...addLast("encoder", new StringEncoder(CharsetUtil.UTF_8));<br>
<br>
server<br>
<br>
...addLast("delimiter", new DelimiterBasedFrameDecoder(65535,<br>
Delimiters.lineDelimiter());<br>
...addLast("decoder", new StringDecoder(CharsetUtil.UTF_8));<br>
<br>
By default the DelimiterBasedFrameDecoder will strip the line delimiters<br>
from the message. There are alternative constructors which allow you specify<br>
whether the delimiters should be stripped or not.<br>
<br>
Cheers<br>
Lee<br>
<font color="#888888">--<br>
View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/How-to-reliable-and-efficiently-implement-a-string-protocol-tp5697794p5702731.html" target="_blank">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/How-to-reliable-and-efficiently-implement-a-string-protocol-tp5697794p5702731.html</a><br>
Sent from the Netty User Group mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="h5">_______________________________________________<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></div>