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