예제 #1
0
        static SocketAwaitableEventArgs OperationAsync(this Socket socket, SocketAwaitableEventArgs awaitable, SocketOperationDelegate socketFunc)
        {
            awaitable.StartOperation();

            if (!socketFunc(socket, awaitable))
            {
                awaitable.CompleteOperation();
            }

            return(awaitable);
        }