Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
            }
        }