예제 #1
0
        static void OnTransportOpened(IAsyncResult result)
        {
            if (result.CompletedSynchronously)
            {
                return;
            }

            TlsTransportInitiator thisPtr = (TlsTransportInitiator)result.AsyncState;

            try
            {
                thisPtr.HandleTransportOpened(result);
            }
            catch (Exception exception)
            {
                if (Fx.IsFatal(exception))
                {
                    throw;
                }

                thisPtr.callbackArgs.Exception = exception;
            }

            thisPtr.Complete();
        }
예제 #2
0
        static void OnInnerTransportConnected(TransportAsyncCallbackArgs innerArgs)
        {
            TlsTransportInitiator thisPtr = (TlsTransportInitiator)innerArgs.UserToken;

            thisPtr.HandleInnerTransportConnected(innerArgs);
        }