code: func (pc *ProtoClient) SendRequest(route string, data []byte) (uint, error) {
  
  	if !pc.ready {
  		return pc.Client.SendRequest(route, data)
  	}
  
  	if cmd, ok := pc.info.Commands[route]; ok {
  		if len(data) < 0 || string(data) == "{}" || cmd.inputMsgDescriptor == nil {
  			pc.expectedInputDescriptor = cmd.outputMsgDescriptor
  			data = data[:0]
  			return pc.Client.SendRequest(route, data)
  		}
  		inputMsg := dynamic.NewMessage(cmd.inputMsgDescriptor)
  		if err := inputMsg.UnmarshalJSON(data); err != nil {
  			return 0, err
  		}
  		realdata, err := inputMsg.Marshal()
  		if err != nil {
  			return 0, err
  		}
  		pc.expectedInputDescriptor = cmd.outputMsgDescriptor
  		return pc.Client.SendRequest(route, realdata)
  	}
  
  	return 0, errors.New("Invalid Route: " + route)
  }
docs: // SendRequest sends a request to the server