private async Task <CommandReply> receiveReplyAsync()
        {
            var result = await ws.ReceiveAsync(segment, CancellationToken.None);

            var count = result.Count;

            if (count > 0)
            {
                var json = Encoding.UTF8.GetString(buf);
                return(JsonConvert.DeserializeObject <CommandReply> (json));
            }
            else
            {
                var b = new ReplyBody(" ", "Error");
                var h = new Header(CommandId.Error, EntityKind.Runtime, -1);
                return(new CommandReply(h, b));
            }
        }
 public CommandReply(Header h, ReplyBody b)
 {
     this.h = h;
     this.b = b;
 }
Beispiel #3
0
 public CommandReply(Header h, ReplyBody b)
 {
     this.h = h;
     this.b = b;
 }