Package com.aelitis.azureus.core.networkmanager.impl

Examples of com.aelitis.azureus.core.networkmanager.impl.ProtocolDecoderInitial


    SocketChannel  channel )
  {
    try{
      TransportHelper  helper = new TCPTransportHelper( channel );
     
      final ProtocolDecoderInitial  decoder =
        new ProtocolDecoderInitial(
            helper,
            null,
            false,
            null,
            new ProtocolDecoderAdapter()
            {
              public void
              decodeComplete(
                ProtocolDecoder  decoder,
                ByteBuffer    remaining_initial_data )
              {
                System.out.println( "incoming decode complete: " +  decoder.getFilter().getName(false));
                               
                readStream( "incoming", decoder.getFilter() );
               
                writeStream( "ten fat monkies", decoder.getFilter() );
              }
             
              public void
              decodeFailed(
                ProtocolDecoder  decoder,
View Full Code Here


        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,
View Full Code Here

TOP

Related Classes of com.aelitis.azureus.core.networkmanager.impl.ProtocolDecoderInitial

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.