如何在 QuickFix 中释放 TCP 缓冲区?
订阅 MarketDataRequest
后,我可以在一段时间内收到报价。但大约一个小时后,价格流下降。经纪人支持对此问题的回应是:
我们断开了客户端的连接,因为我们无法将更新推送到 客户端的 TCP 缓冲区已满 - 这可能是由于网络原因 丢弃或应用程序停止在他们这边消耗并且他们接收 缓冲区已满并停止发送 TCP ack。
如何在 QuickFix 中释放 TCP 缓冲区?
(使用 QuickFix.NET v4.2)
After subscribing to MarketDataRequest
, i'm able to receive quotes for a while. But after an hour or so, the price stream drops. Broker support response to the issue is:
we disconnected the client because we were not able to push updates to
the client as their TCP buffer is full - this could be due to network
drop or application stopped consuming on their side and their receive
buffer got full and stopped sending TCP acks.
How do I free TCP buffer in QuickFix?
(Using QuickFix.NET v4.2)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您误解了他们对您问题的分析。他们试图告诉您的是,他们观察到您的 TCP 连接端无法接收其他数据,因为其(操作系统或网卡)缓冲区已满。这意味着他们发送的速度比您接收的速度快。也可能是您的网络连接不稳定,或者被您的提供商之一限制(特别是如果您通过互联网或任何不保证带宽的线路执行此操作)。
要自己分析问题,您可以使用 Wireshark 等工具来观察您端的网络连接,并观察传入的数据包以及 TCP 级别的不良影响。
也许您的代码太慢,或者可能在一段时间后变得堵塞并且无法处理新消息。你观察到什么?
You have misunderstood their analysis of your problem. What they are trying to tell you is that they observed your end of the TCP connection as being unable to receive additional data because its (operating system or network card) buffer was full. This means they are sending faster than you are receiving. It could also be that your network connection is flaky, or is being throttled by one of your providers (especially if you are doing this via the internet or any line which is not guaranteed-bandwidth).
To analyze the problem yourself, you could use tools like Wireshark to watch the network connection on your end and observe the packets coming and and perhaps adverse effects at the TCP level.
Maybe your code is too slow, or maybe it's getting jammed up after a while and failing to process new messages. What do you observe?