title: How to send large file as chunks via MCSession NSOutputStream
body: <p>I want to send large video file to connected peer in chunks via <code>NSOutputStream</code></p>
  
  <p>I am using below code.</p>
  
  <pre><code>NSError *error;
  self.outputStream = [_appDelegate.mcManager.session startStreamWithName:@"Mystream" toPeer:[[_appDelegate.mcManager.session connectedPeers] objectAtIndex:0] error:&amp;error];
  </code></pre>
  
  <p>At receiver side <code>NSStream</code> delegate not receiving entire send data.</p>
  
  <pre><code>-(void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode{
  
      switch(eventCode) {
          case  NSStreamEventEndEncountered:
              break;
  
          case NSStreamEventHasBytesAvailable:
              if ([aStream isKindOfClass:[NSInputStream class]]) {
  
              }
              break;
          case NSStreamEventErrorOccurred:
  
              break;
          case NSStreamEventHasSpaceAvailable:
              break;
          case NSStreamEventNone:
              break;
          case NSStreamEventOpenCompleted:
              break;
      }
  
  }
  </code></pre>