Beispiel #1
0
    void Start()
    {
        Debug.Log("Start is called!");
        SimonProto.ReqGateGetConnector getConnector = new SimonProto.ReqGateGetConnector();
        getConnector.Region = "abc";
        byte[]   databytes = getConnector.ToByteArray();
        IMessage imPerson  = new SimonProto.ReqGateGetConnector();

        SimonProto.ReqGateGetConnector get2 = (SimonProto.ReqGateGetConnector)imPerson.Descriptor.Parser.ParseFrom(databytes);
        Debug.Log(get2.Region);
    }
Beispiel #2
0
    private void onDoChatClick()
    {
        string interfaceName = "ReqGateGetConnector";

        SimonProto.ReqGateGetConnector getConnector = new SimonProto.ReqGateGetConnector();
        getConnector.Region = "abc";
        byte[] databytes = getConnector.ToByteArray();
        pc.Req(interfaceName, databytes, response =>
        {
            SimonProto.ResGateGetConnector res = SimonProto.ResGateGetConnector.Parser.ParseFrom((byte[])response);
            Debug.Log("[Protocol]response:" + res.ToString());
        });
    }