我有一个活动连接,我在客户端和服务器之间发送和接收数据。服务器是OBD2 Wifi Dongle。
一切正常,但插座在5分钟后完全关闭。没有不活动。我经常与服务器通信。
你有什么想法吗?或者似乎OBD Dongle正在关闭连接?因为它总是在5分钟后得到。
答案 0 :(得分:0)
只需发送一个心跳,例如每隔5秒 @keyframes pulse_animation {
0% { transform: scale(1); }
28% {transform: scale(1);}
29% {transform: scale(0.9)}
30% { transform: scale(0.8); }
31% {transform: scale(0.9)}
32% {transform: scale(1);}
80% { transform: scale(1); }
100% { transform: scale(1); }
}
#pulse {
animation-name: pulse_animation;
animation-duration: 6s;
transform-origin:77% 33%;
animation-iteration-count: infinite ;
animation-timing-function: linear;
animation-delay: 0;
}
<g id="cursor">
<animateTransform attributeName="transform"
id="arrow"
attributeType="XML"
type="translate"
dur="1.5s"
values="100,200;0,0"
begin="0s; last.end"
fill="remove" />
<animate attributeName="opacity"
values="1;0" dur="1s"
begin="last.end"
fill="freeze"
repeatCount=""/>
<animate attributeName="opacity"
values="0;1" dur="0.5s"
begin="last.end"
fill="freeze"
repeatCount=""/>
<circle id="cursor-circle" class="st20" cx="0" cy="0" r="6.9" transform="translate(525.6 185.5)" >
<animateTransform attributeName="transform"
id="grow"
type="scale"
values="0 0;7 7"
additive="sum"
begin="arrow.end+0.2s"
dur="1s"
repeatCount="" />
<animate attributeName="opacity"
id="last"
values="1;0" dur="1s"
begin="arrow.end+0.2s"
repeatCount=""/>
</circle>
<polygon id="pulse" class="st19" points="512.6,163.4 517.8,210.9 527.1,198.4 536.9,215.4 545.4,210.4 535.6,193.5 551,191.7" >
</polygon>
</g>
- 这意味着'TESTER PRESENT',使套接字保持活动状态,并且实际上是一些车辆协议的要求。