Support Board
Date/Time: Mon, 21 Apr 2025 05:07:30 +0000
Post From: DTC Protocol - JSON heartbeat (ping client->server) - bug?
[2022-12-21 22:34:24] |
User5044343 - Posts: 68 |
I'm sending a heartbeat(ping) back to the server - Sierra logs confirm that - but it doesn't register as a heartbeat and times out after 60 sec. Data flows to the client fine. I have the null terminator at the end of the json as well. (PHP) $msg = '{"Type":3}'."\0"; $conn2->send($msg); DTC Protocol server | Incoming connection from 10.70.70.72. | 2022-12-16 05:23:09.976 DTC client #37. 10.70.70.72 (4) | Creating socket. | 2022-12-16 05:23:09.979 DTC client #37. 10.70.70.72 (4) | New receive buffer size: 262144 | 2022-12-16 05:23:09.979 DTC client #37. 10.70.70.72 (4) | Allocated send buffers: 32 of 131072 bytes. | 2022-12-16 05:23:09.980 WSServer | DTC client #37. 10.70.70.72 (4) | Start Server | 2022-12-16 05:23:09.981 WSServer | DTC client #37. 10.70.70.72 (4) | Switch to HANDSHAKE | 2022-12-16 05:23:09.981 WSServer | DTC client #37. 10.70.70.72 (4) | Switch to READY_DATA | 2022-12-16 05:23:09.981 WSServer | DTC client #37. 10.70.70.72 (4) | Response HANDSHAKE with status code 101 | 2022-12-16 05:23:09.981 JSON data: {"Type":1,"HeartbeatIntervalInSeconds":5,"TradeMode":1,"Username": xxx"Password": "xxx","ClientName":"trades"} | 2022-12-16 05:23:09.985 DTC client #37. 10.70.70.72 | Requested heartbeat interval: 5 | 2022-12-16 05:23:09.987 DTC client #37. trades. 10.70.70.72 | Received logon request. | 2022-12-16 05:23:09.987 DTC client #37. trades. 10.70.70.72 | Sent successful Logon response message to client. Username: xxx. Result text: Connected to SC DTC Protocol server. Service=sc_futures_direct.dtc.trading|SymbolSettings=sc_futures_direct.dtc.trading | 2022-12-16 05:23:09.987 JSON data: {"Type":3} | 2022-12-16 05:23:10.981 JSON data: {"Type":3} | 2022-12-16 05:23:15.983 JSON data: {"Type":3} | 2022-12-16 05:23:20.988 JSON data: {"Type":3} | 2022-12-16 05:23:25.992 JSON data: {"Type":3} | 2022-12-16 05:23:30.996 JSON data: {"Type":3} | 2022-12-16 05:23:36.000 JSON data: {"Type":3} | 2022-12-16 05:23:41.003 JSON data: {"Type":3} | 2022-12-16 05:23:46.012 WSServer | DTC client #37. 10.70.70.72 (4) | Timeout waiting for ping message from client. | 2022-12-16 05:23:49.986 WSServer | DTC client #37. 10.70.70.72 (4) | Delay close connection now | 2022-12-16 05:23:50.005 DTC client #37. 10.70.70.72 (4) | CloseSocket call. | 2022-12-16 05:23:50.005 DTC client #37. 10.70.70.72 (4) | Max send buffers used during socket life: 3 | 2022-12-16 05:23:50.005 DTC client #37. 10.70.70.72 (4) | Max send buffer size during socket life: 14174 | 2022-12-16 05:23:50.005 DTC client #37. 10.70.70.72 (4) | Shutdown started. Waiting for graceful close. | 2022-12-16 05:23:50.005 DTC client #37. 10.70.70.72 (4) | Socket gracefully closed by remote side. | 2022-12-16 05:23:50.005 DTC client #37. 10.70.70.72 (4) | Closed. | 2022-12-16 05:23:50.005 Deleting individual DTC server: DTC client #37. trades. 10.70.70.72 | 2022-12-16 05:23:50.999 DTC server: DTC client #37. trades. 10.70.70.72 successfully deleted. | 2022-12-16 05:23:51.002 |