~/talk

PHP WebSockets

Talkat API Platform Conference 2022 · 2022-09-15..09-16· [php, web-platform]
slides:none on file

Builds a WebSocket server in pure PHP using Ratchet, listens on port 8080, and uses simple JSON messages with types like startRaffle, registerPlayer and pickWinner. Implements a raffle: host starts (password checked as hunter2 for the demo), server returns join code ABCD, players register by name, server shuffles a copy of the players array and picks a winner, broadcasts winner/loser messages to all connections. Demo runs (Heroku required a 30s timeout workaround with pings every ~20s); not production hardened (no auth standard, reconnection, or dropped-connection cleanup).

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:55Real-time communication
  3. 5:07Websocket communication
  4. 7:51Protocols and concepts
  5. 13:10Building the server
  6. 17:33Server demonstration
  7. 20:11Implementing game logic
  8. 24:43Message handling
  9. 28:00Client-side development
  10. 32:42Improvements and alternatives
  11. 36:47Conclusion and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.