Beispiel #1
0
            static void OnSendData(IAsyncResult result)
            {
                if (result.CompletedSynchronously)
                {
                    return;
                }

                WriteDataAsyncResult thisPtr             = (WriteDataAsyncResult)result.AsyncState;
                Exception            completionException = null;
                bool completeSelf = false;

                try
                {
                    completeSelf = thisPtr.CompleteSendData(result);
                }
                catch (Exception e)
                {
                    completeSelf        = true;
                    completionException = e;
                }

                if (completeSelf)
                {
                    thisPtr.Complete(false, completionException);
                }
            }
Beispiel #2
0
            static void OnPadData(IAsyncResult result)
            {
                if (result.CompletedSynchronously)
                {
                    return;
                }

                WriteDataAsyncResult thisPtr             = (WriteDataAsyncResult)result.AsyncState;
                Exception            completionException = null;

                try
                {
                    thisPtr.CompletePadData(result);
                }
                catch (Exception e)
                {
                    completionException = e;
                }

                thisPtr.Complete(false, completionException);
            }
Beispiel #3
0
 void EndWriteData(IAsyncResult result)
 {
     WriteDataAsyncResult.End(result);
 }