Ejemplo n.º 1
0
 public static SocketAwaitable SendAsync(this Socket socket, SocketAwaitable awaitable)
 {
     awaitable.Reset();
     if (!socket.SendAsync(awaitable.EventArgs))
     {
         awaitable.WasCompleted = true;
     }
     return(awaitable);
 }
Ejemplo n.º 2
0
 public SocketTpktReader(Socket socket)
 {
     this.socket = socket;
     args        = new SocketAsyncEventArgs();
     awaitable   = new SocketAwaitable(args);
 }