コード例 #1
0
        public async Task SendAsync(MessageType messageType, string body, CancellationToken cancellationToken)
        {
            Trace.Info($"Sending message of length {body.Length}, with hash '{IOUtil.GetSha256Hash(body)}'");
            await _writeStream.WriteInt32Async((int)messageType, cancellationToken);

            await _writeStream.WriteStringAsync(body, cancellationToken);
        }
コード例 #2
0
        public async Task SendAsync(MessageType messageType, string body, CancellationToken cancellationToken)
        {
            await _writeStream.WriteInt32Async((int)messageType, cancellationToken);

            await _writeStream.WriteStringAsync(body, cancellationToken);
        }