writeStream( "two jolly porkers".getBytes(), channel );
}else{
TransportHelper helper = new TCPTransportHelper( channel );
final ProtocolDecoderInitial decoder =
new ProtocolDecoderInitial(
helper,
new byte[][]{ shared_secret },
true,
null,
new ProtocolDecoderAdapter()
{
public void
decodeComplete(
ProtocolDecoder decoder,
ByteBuffer remaining_initial_data )
{
System.out.println( "outgoing decode complete: " + decoder.getFilter().getName(false));
readStream( "incoming", decoder.getFilter() );
writeStream( TEST_HEADER, decoder.getFilter());
writeStream( "two jolly porkers", decoder.getFilter() );
}
public void
decodeFailed(
ProtocolDecoder decoder,