# Is there a way to simulate a waiting epoll call with EOS\_P2P\_ReceivePacket ? 

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-simulate-a-waiting-epoll-call-with-eos-p2p-receivepacket/2858236>\
**Category:** Multiplayer\
**Tags:** epic-online-services, question\
**Created:** [February 27, 2025, 6:30am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-simulate-a-waiting-epoll-call-with-eos-p2p-receivepacket/2858236 "2025-02-27T06:30:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [February 27, 2025, 6:30am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-simulate-a-waiting-epoll-call-with-eos-p2p-receivepacket/2858236/1 "2025-02-27T06:30:27Z")

</div>

Hello,

I’m migrating some old networking code to EOS. The issue I’ve run into is that we have all networking on a separate thread working with old school poll calls which have a timeout parameter. Is there a way to achieve this with EOS\_P2P\_ReceivePacket or EOS\_P2P\_GetNextReceivedPacketSize ? I’ve looked into the eos\_p2p.h header but there seems to be no waiting function or signal.

I can trigger some semaphores from inside the EOS wrapping calls and send those incoming messages to the working thread but it will add a layer of complexity to the code I would rather be without.

---

<div class="post-metadata">

**Author:** ![SebBergy2.0](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sebbergy2.0/32/1214708_2.png) [@SebBergy2.0](https://forums.unrealengine.com/u/SebBergy2.0)\
**Post date:** [March 26, 2025, 5:28pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-simulate-a-waiting-epoll-call-with-eos-p2p-receivepacket/2858236/2 "2025-03-26T17:28:54Z")

</div>

Hello, sorry for the really long delay. The SDK isn’t thread-safe; you’ll need to make sure all EOS SDK API calls are made from the same thread, and we recommend doing these on the main thread. There’s no polling functionality in the SDK. Packets are received by the SDK and fill an internal queue. Your game needs to call EOS\_P2P\_ReceivePacket to move packets from the internal SDK queue to your game. We recommend calling EOS\_P2P\_ReceivePacket frequently to prevent the SDK queue from filling to avoid packet loss.
