Пример #1
0
        public static async Task WriteResponseAsync <TResponse>(Stream ms, TResponse response) where TResponse : IMessage <TResponse>
        {
            await ResponseUtils.WriteHeaderAsync(ms, response.CalculateSize(), false, CancellationToken.None);

            await ms.WriteAsync(response.ToByteArray());
        }