コード例 #1
0
 /// <summary>
 /// Invokes SendAsync method on the wrapped socket.
 /// </summary>
 /// <param name="args">The <see cref="SocketAsyncEventArgs"/> instance containing the event data.</param>
 /// <returns>Result of original method.</returns>
 public bool SendAsync(SocketAsyncEventArgs args)
 {
     this.socket.BeginSend(args.Buffer, args.Offset, args.Count, args.SocketFlags, args.EndSend, this.socket);
     return(true);
 }
コード例 #2
0
 /// <summary>
 /// Invokes SendToAsync method on the wrapped socket.
 /// </summary>
 /// <param name="args">The <see cref="SocketAsyncEventArgs"/> instance containing the event data.</param>
 /// <returns>Result of original method.</returns>
 public bool SendToAsync(SocketAsyncEventArgs args)
 {
     return(this.socket.SendToAsync(args));
 }
コード例 #3
0
        // emulate missing .NET CF behavior

        /// <summary>
        /// Invokes ConnectAsync method on the wrapped socket.
        /// </summary>
        /// <param name="args">The <see cref="SocketAsyncEventArgs"/> instance containing the event data.</param>
        /// <returns>Result of original method.</returns>
        public bool ConnectAsync(SocketAsyncEventArgs args)
        {
            this.socket.BeginConnect(args.RemoteEndPoint, args.EndConnect, this.socket);
            return(true);
        }
コード例 #4
0
 /// <summary>
 /// Invokes ConnectAsync method on the wrapped socket.
 /// </summary>
 /// <param name="args">The <see cref="SocketAsyncEventArgs"/> instance containing the event data.</param>
 /// <returns>Result of original method.</returns>
 public bool ConnectAsync(SocketAsyncEventArgs args)
 {
     return(this.socket.ConnectAsync(args));
 }