# socket.io and client initiated pings

**URL:** <https://community.gatling.io/t/socket-io-and-client-initiated-pings/5323>\
**Category:** Gatling (Open-Source)\
**Created:** [October 25, 2019, 8:00pm UTC](https://community.gatling.io/t/socket-io-and-client-initiated-pings/5323 "2019-10-25T20:00:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Schiffer](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@Peter\_Schiffer](https://community.gatling.io/u/Peter_Schiffer)\
**Post date:** [October 25, 2019, 8:00pm UTC](https://community.gatling.io/t/socket-io-and-client-initiated-pings/5323/1 "2019-10-25T20:00:12Z")

</div>

Hello all,

I’m really enjoying working with Gatling, usually I’m able to do everything I need there. However there’s this one thing I couldn’t solve so far. Our web application is using [socket.io](http://socket.io) and pings are initiated by a client. If a client doesn’t send a ping within a specified interval, server disconnects the client. Now I can send pings randomly throughout the scenario to keep the connection alive, but that’s not really a good solution. Do you have any idea how this could be achieved? How to create some loop in the background which will send a message after some time, or periodically interrupt the scenario to send a message?

Thank you!

peter

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [October 27, 2019, 1:00pm UTC](https://community.gatling.io/t/socket-io-and-client-initiated-pings/5323/2 "2019-10-27T13:00:04Z")

</div>

It would probably be nice to be able to periodically send ping frames.  
Contributions are very welcome.

---

<div class="post-metadata">

**Author:** ![Peter\_Schiffer](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@Peter\_Schiffer](https://community.gatling.io/u/Peter_Schiffer)\
**Post date:** [October 29, 2019, 8:04pm UTC](https://community.gatling.io/t/socket-io-and-client-initiated-pings/5323/3 "2019-10-29T20:04:26Z")

</div>

Hi Stéphane,

thanks for your reply. I think this feature request could solve my problem and couple of other problems too: [https://github.com/gatling/gatling/issues/3783](https://github.com/gatling/gatling/issues/3783)

Unfortunately I can do no Scala, so I’m pretty useless in this case 😕

Thank you for Gatling and keep up the good work!

peter
