Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教 TraderServer 重连 #4

Closed
stevenwangau opened this issue Sep 27, 2016 · 1 comment
Closed

请教 TraderServer 重连 #4

stevenwangau opened this issue Sep 27, 2016 · 1 comment

Comments

@stevenwangau
Copy link

大师,
你好!
我试着断掉网络连接,恢复网络连接后你的CTP-TraderServer能够自动重新连接上
并且显示:1,已连接上交易服务器 2,已登录行情服务器 3,投资者结算结果已确认,可以交易
但此时行情是接收不到的,交易也发不出去
请教:是否还需初始化一次?如何判断重连呢?好像函数OnFrontDisconnected 可以调用的?
谢谢你的回复!
再次感谢!

@zhuzhenpeng
Copy link
Owner

Onxx的函数是回调函数,CTP执行完某些动作后会执行这些。比如OnFrontDisconnected是在CTP检测到和前端断开时执行的动作。具体的代码我已经忘了,既然可以重新连接上,那么应该在OnFrontConnected是进行你需要的初始化操作

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants