anchor.diff:        });
         
         channel.onMessage.listen((MessageEvent ev) {
  +        if(ev.data == 'done') {
  +          channel.close();
  +        }
           print(ev.data);
         });
       } else {
  -      final int startTime = new DateTime.now().millisecondsSinceEpoch;
  -      
  -      
  +      int startTime = new DateTime.now().millisecondsSinceEpoch;
         print('Receiver');
         List receiveBuffer = [];
  +      
  +      channel.onOpen.listen((Event ev) {
  +        stateTimer.cancel();
  +        print('Channel opened');
  +        channel.send('hello');
  +      });
  +      
         channel.onMessage.listen((MessageEvent ev) {
           if(ev.data is ByteBuffer) {
             ByteBuffer buffer = ev.data;
             receiveBuffer.add(ev.data);
  -          
  +          print('Chunk received: ${buffer.lengthInBytes}');
             if(buffer.lengthInBytes < 16384) {
  -            final int time = new DateTime.now().millisecondsSinceEpoch - startTime;
  +            int time = new DateTime.now().millisecondsSinceEpoch - startTime;
               print('Receiving done after ${time}ms');
               AnchorElement save = new AnchorElement();
               save.target = '_blank';
  
positive.code: P2PClient client;
  Map<String, File> files = {};
  void _onPeerJoined(Peer peer) {
    peer.onChannelCreated.listen((final RtcDataChannel channel) {
      print('Channel created with label ${channel.label}');
      channel.binaryType = 'arraybuffer';
      
      if(files.containsKey(channel.label)) {
        print('Sender');
        
        channel.onOpen.listen((Event ev) {
          print('Channel is opened');
          final File file = files[channel.label];
          final int startTime = new DateTime.now().millisecondsSinceEpoch;
          
          print('File to send: ${file.name} ${file.size}');
          
          var chunkSize = 16384;
          sliceFile(final int offset) {
            final FileReader reader = new FileReader();
            reader.onLoadEnd.listen((Event ev) {
              print('bytes in buffer (before): ${channel.bufferedAmount}');
              channel.send(reader.result);
              print('bytes in buffer (after): ${channel.bufferedAmount}');
              if (file.size > offset + (reader.result as TypedData).lengthInBytes) {
                // new Future(() => sliceFile(offset + chunkSize));
                // 0 Delay sending
                sliceFile(offset + chunkSize);
              } else {
                final int time = new DateTime.now().millisecondsSinceEpoch - startTime;
                print('Sending done after ${time}ms');
              }
            });
            Blob slice = file.slice(offset, offset + chunkSize);
  
negative.code: void main() {
    client = new WebSocketP2PClient(url, rtcConfiguration);
    client.onConnected.listen((final int id) {
      print('Local ID: $id');
      client.join('filetransfer');
    });
    
  