Exemplo n.º 1
0
 public override int ReqConnect(string pFront)
 {
     _t.RegisterFront(pFront);
     _t.SubscribePrivateTopic(THOST_TE_RESUME_TYPE.THOST_TERT_RESTART);
     _t.SubscribePublicTopic(THOST_TE_RESUME_TYPE.THOST_TERT_RESTART);
     return((int)_t.Init());
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            q = new CtpQuote("ctp_quote");
            t = new CtpTrade("ctp_trade");

            t.SetOnFrontConnected(t_connected);
            t.SetOnRspUserLogin(t_login);
            t.SetOnRtnTradingNotice(t_notice);

            q.SetOnFrontConnected(connected);
            q.SetOnRspUserLogin(login);

            t.RegisterFront("tcp://180.168.146.187:10000");
            q.RegisterFront("tcp://180.168.146.187:10010");

            t.Init();
            q.Init();
            Console.ReadLine();
        }