コード例 #1
0
        public async Task <Message> ReceiveMessageAsync()
        {
            var messageType = (MessageType)(await _networkCommunication.ReceiveBytesAsync(1))[0];
            var messageId   = (MessageId)await _networkCommunication.ReceiveShortAsync();

            switch (messageId, messageType)
            {
コード例 #2
0
        public async Task <ErrorResponse> ReceiveMessageAsync()
        {
            var errorId = await _networkCommunication.ReceiveShortAsync();

            var message = await _networkCommunication.ReceiveStringAsync();

            return(new ErrorResponse((ErrorId)errorId, message));
        }