npm i -g wscat
mix phx.server
# another terminal
wscat -c 'ws://localhost:4000/socket/websocket?vsn=2.0.0'
> ["1", "1", "ping", "phx_join", {}]
< ["1","1","ping","phx_reply",{"response":{},"status":"ok"}]
> ["1", "1", "ping", "ping", {}]
< ["1","1","ping","phx_reply",{"response":{"ping":"pong"},"status":"ok"}]
> ["1", "1", "ping", "ping", {"ack": "hi!"}]
< ["1","1","ping","phx_reply",{"response":{"ping":"hi!"},"status":"ok"}]
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
dannypsnl-fork/phx_realtime
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Elixir: Phoenix & Channel