private void Serialize(byte[] data, Mmind.Request person)
 {
     using (CodedOutputStream cos = new CodedOutputStream(data))
     {
         person.WriteTo(cos);
     }
 }
 public Mmind.Response sendReq(Mmind.Request req)
 {
     reqbuf = new byte[req.CalculateSize()];
     Serialize(reqbuf, req);
     client.SendFrame(reqbuf);
     resbuf = client.ReceiveFrameBytes();
     Mmind.Response rel = Mmind.Response.Parser.ParseFrom(resbuf);
     return(rel);
 }
 Mmind.Response sendRequest(int command, double value_num, string value_str)
 {
     Mmind.Request Request = new Mmind.Request();
     Request.Command     = command;
     Request.ValueDouble = value_num;
     Request.ValueString = value_str;
     Mmind.Response reply = sendReq(Request);
     return(reply);
 }