Esempio n. 1
0
            private bool HandleWriteBufferComplete(TransportAsyncCallbackArgs args)
            {
                bool flag;

                if (args.Exception == null)
                {
                    flag = true;
                }
                else
                {
                    flag = false;
                    this.parent.OnIoFault(args.Exception);
                }
                args.Reset();
                return(flag);
            }
Esempio n. 2
0
            bool HandleWriteBufferComplete(TransportAsyncCallbackArgs args)
            {
                bool shouldContinue;

                if (args.Exception != null)
                {
                    shouldContinue = false;
                    this.parent.OnIoFault(args.Exception);
                }
                else
                {
                    Fx.Assert(args.BytesTransfered == args.Count, "Bytes transferred not equal to the bytes set.");
                    shouldContinue = true;
                }

                args.Reset();
                return(shouldContinue);
            }
Esempio n. 3
0
            bool HandleWriteBufferComplete(TransportAsyncCallbackArgs args)
            {
                WriteRequest request = (WriteRequest)args.UserToken;

                args.Reset();
                this.writeBuffer.Reset();

                if (args.Exception != null)
                {
                    this.parent.OnIoFault(args.Exception);
                    return(false);
                }

                if (request != null)
                {
                    WriteRequest.Complete(request);
                }

                Fx.Assert(args.BytesTransfered == args.Count, "Bytes transferred not equal to the bytes set.");
                return(true);
            }