Exemple #1
0
 /// <summary>
 ///		Performs protocol specific asynchronous 'Send' operation.
 /// </summary>
 /// <param name="context">Context information.</param>
 protected sealed override void SendCore(ServerResponseContext context)
 {
     // Manager stores the socket which is dedicated socket to this transport in the AcceptSocket property.
     if (!this.BoundSocket.SendToAsync(context.SocketContext))
     {
         context.SetCompletedSynchronously();
         this.OnSent(context);
     }
 }
Exemple #2
0
        /// <summary>
        ///		Performs protocol specific asynchronous 'Send' operation.
        /// </summary>
        /// <param name="context">Context information.</param>
        protected sealed override void SendCore(ServerResponseContext context)
        {
            Contract.Assert(this.BoundSocket != null);

            if (!this.BoundSocket.SendAsync(context.SocketContext))
            {
                context.SetCompletedSynchronously();
                this.OnSent(context);
            }
        }