Exemplo n.º 1
0
    public void SetUp()
    {
        RTMRegistration.Register();
        this._processor = new RTMProcessor();
        Integration_RTMProcessor self = this;

        this._eventDelegate = (evd) => {
            self._processor.OnSecond(evd.GetTimestamp());
        };
        FPManager.Instance.AddSecond(this._eventDelegate);
        IDictionary <string, object> dict = new Dictionary <string, object>()
        {
            { "from", 123 },
            { "to", 456 },
            { "gid", 666 },
            { "rid", 777 },
            { "mtype", 8 },
            { "mid", 1570535270000003 },
            { "msg", "hello" },
            { "attrs", "{}" },
            { "mtime", 157053527000 },
        };

        try {
            using (MemoryStream outputStream = new MemoryStream()) {
                MsgPack.Serialize(dict, outputStream);
                outputStream.Seek(0, SeekOrigin.Begin);
                this._bytes = outputStream.ToArray();
            }
        } catch (Exception ex) {
            Debug.LogError(ex);
        }
    }
Exemplo n.º 2
0
    void Start()
    {
        RTMRegistration.Register();

        byte[] fileBytes = LoadFile(Application.dataPath + "/StreamingAssets/key/test-secp256k1-public.der");

        //SingleClientSend
        // this._testCase = new SingleClientSend();

        //SingleClientConcurrency
        // this._testCase = new SingleClientConcurrency();

        //SingleClientPush
        // this._testCase = new SingleClientPush();

        //TestCase
        this._testCase = new TestCase(777779, "2EF4D15F9C3084F9A8B37E834AEE5C2D");

        //SingleMicphone
        // this._testCase = new SingleMicphone();

        if (this._testCase != null)
        {
            this._testCase.StartTest(fileBytes);
        }
    }
 public void SetUp()
 {
     RTMRegistration.Register();
     this._sender  = new RTMSender();
     this._client  = new FPClient("52.83.245.22", 13325, 20 * 1000);
     this._payload = new Dictionary <string, object>()
     {
         { "pid", 11000001 },
         { "uid", 777779 },
         { "what", "rtmGated" },
         { "addrType", "ipv4" },
         { "version", null }
     };
     this._data = new FPData();
     this._data.SetFlag(0x1);
     this._data.SetMtype(0x1);
     this._data.SetMethod("which");
 }
Exemplo n.º 4
0
 public void SetUp()
 {
     RTMRegistration.Register();
 }