Ejemplo n.º 1
0
 public AsyncReader(Stream stream, OnBinaryAvailable binaryCallback)
 {
     _stream         = stream;
     _callbackBinary = binaryCallback;
     _byteBuffer     = new byte[4096];
     _eofEvent       = new ManualResetEvent(false);
     _stream.BeginRead(_byteBuffer, 0, _byteBuffer.Length, read, null);
 }
Ejemplo n.º 2
0
 public AsyncReader(Stream stream, OnBinaryAvailable binaryCallback)
 {
     _stream = stream;
     _callbackBinary = binaryCallback;
     _byteBuffer = new byte[4096];
     _eofEvent = new ManualResetEvent(false);
     _stream.BeginRead(_byteBuffer, 0, _byteBuffer.Length, read, null);
 }