Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Perl alarm not going off when local websocket connection is active

by cavac (Prior)
on May 05, 2025 at 14:45 UTC ( [id://11164944]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl alarm not going off when local websocket connection is active
in thread Perl alarm not going off when local websocket connection is active

Cyclic callbacks might also be an option. My guess is those are already implemented in some way to handle the cyclic nature of the game logic (if it's one of those real time games). So setting a player state for "is in timeout since..." and checking that in the cyclic callback could also be an option.

Additionally, in my own software, i send regular messages (pings) in both directions. This keeps the connection open (especially on NATed networks), and also provides the functionality to check for application timeouts. (Just because a connection is open doesn't mean the application at the other end still functions correctly).

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
Also check out my sisters artwork and my weekly webcomics
  • Comment on Re^2: Perl alarm not going off when local websocket connection is active

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11164944]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2025-06-19 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.