Created
June 12, 2012 13:44
-
-
Save nickman/2917590 to your computer and use it in GitHub Desktop.
MyStringServerFactory - All Exclusive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MyStringServerFactory implements ChannelPipelineFactory { | |
| public ChannelPipeline getPipeline() throws Exception { | |
| ChannelPipeline p = Channels.pipeline(); | |
| // Decoders | |
| p.addLast("frameDecoder", new DelimiterBasedFrameDecoder(Delimiters.lineDelimiter())); | |
| p.ddLast("stringDecoder", new StringDecoder(CharsetUtil.UTF_8)); | |
| // Encoder | |
| p.addLast("stringEncoder", new StringEncoder(CharsetUtil.UTF_8)); | |
| return p; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment