Beispiel #1
0
    public void ThreadedClient()
    {
        ThreadedClient client = new ThreadedClient(subscribePORT);

        try {
            client.subscribe(HOST, PORT, "Trades", new SampleMessageHandler());
        } catch (IOException e) {
            Console.WriteLine(e.ToString());
            Console.Write(e.StackTrace);
        }
    }
Beispiel #2
0
 private void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Beispiel #3
0
        public void testThreaded()
        {
            ThreadedClient client = new ThreadedClient(SUB_PORT);

            try
            {
                client.subscribe(REMOTE_HOST, REMOTE_PORT, REMOTE_TABLE_NAME, new SampleMessageHandler(), 0);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                Console.Write(ex.StackTrace);
                Assert.Fail(ex.Message);
            }
        }
Beispiel #4
0
        public void testUnsubscribe()
        {
            ThreadedClient client = new ThreadedClient(SUB_PORT);

            client.unsubscribe(REMOTE_HOST, REMOTE_PORT, REMOTE_TABLE_NAME);
        }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     myClient = new ThreadedClient();
     myClient.Start();
 }