Exemple #1
0
 private static void WriteCompleteCallback(TransportAsyncCallbackArgs args)
 {
     AsyncIO.AsyncWriter userToken = (AsyncIO.AsyncWriter)args.UserToken;
     if (!userToken.HandleWriteBufferComplete(args))
     {
         return;
     }
     userToken.writeWorker.ContinueWork();
 }
Exemple #2
0
 public AsyncIO(IIoHandler parent, int maxFrameSize, TransportBase transport, bool isInitiator) : base("async-io")
 {
     AsyncIO.AsyncWriter asyncFrameWriter;
     this.ioHandler = parent;
     this.transport = transport;
     if (this.transport.RequiresCompleteFrames)
     {
         asyncFrameWriter = new AsyncIO.AsyncFrameWriter(this.transport, parent);
     }
     else
     {
         asyncFrameWriter = new AsyncIO.AsyncWriter(this.transport, parent);
     }
     this.writer = asyncFrameWriter;
     this.reader = new AsyncIO.AsyncReader(this, maxFrameSize, isInitiator);
 }