相較示例1中增加了stringencoder和stringdecoder兩個handler對象。
stringdecoder對接受的内容進行解碼,繼承channelupstreamhandler類。
stringencoder對發送的内容進行編碼,繼承channeldownstreamhandler類。
請參看本部落格《netty學習6-源碼跟蹤channelpipeline和chanelhandler工作原理》
http://blog.csdn.net/woshixuye/article/details/53859776