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