Java Code Examples for protocolsupport.protocol.ConnectionImpl#initCodec()

The following examples show how to use protocolsupport.protocol.ConnectionImpl#initCodec() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 2
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 3
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 4
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 5
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 6
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 7
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 8
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 9
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 10
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 11
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 12
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 13
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 14
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 15
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 16
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}
 
Example 17
Source File: PipeLineBuilder.java    From ProtocolSupport with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void buildCodec(Channel channel, ConnectionImpl connection) {
	ChannelPipeline pipeline = channel.pipeline();
	PacketDecoder decoder = new PacketDecoder(connection);
	PacketEncoder encoder = new PacketEncoder(connection);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_RECEIVE, ChannelHandlers.DECODER_TRANSFORMER, decoder);
	pipeline.addAfter(ChannelHandlers.RAW_CAPTURE_SEND, ChannelHandlers.ENCODER_TRANSFORMER, encoder);
	connection.initCodec(PacketCodec.instance, encoder, decoder);
}