File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11(* StatusPost - Real-time message board with WebSocket updates *)
22
33(Application-Start: StatusPost) {
4- < Log> "Starting StatusPost..." to the <console>.
5- < Start> the <http-server> with { websocket: "/ws" }.
6- < Log> "StatusPost ready on http://localhost:8080" to the <console>.
7- < Log> "WebSocket available on ws://localhost:8080/ws" to the <console>.
8- < Keepalive> the <application> for the <events>.
9- < Return> an <OK: status> for the <startup>.
4+ Log "Starting StatusPost..." to the <console>.
5+ Start the <http-server> with { websocket: "/ws" }.
6+ Log "StatusPost ready on http://localhost:8080" to the <console>.
7+ Log "WebSocket available on ws://localhost:8080/ws" to the <console>.
8+ Keepalive the <application> for the <events>.
9+ Return an <OK: status> for the <startup>.
1010}
1111
1212(Application-End: Success) {
13- < Log> "StatusPost shutting down..." to the <console>.
14- < Stop> the <http-server> with {}.
15- < Return> an <OK: status> for the <shutdown>.
13+ Log "StatusPost shutting down..." to the <console>.
14+ Stop the <http-server> with {}.
15+ Return an <OK: status> for the <shutdown>.
1616}
Original file line number Diff line number Diff line change 11(* WebSocket Event Handlers *)
22
33(Handle WebSocket Connect: WebSocket Event Handler) {
4- < Extract> the <connection-id> from the <event: id>.
5- < Log> "WebSocket client connected" to the <console>.
6- < Return> an <OK: status> for the <connection>.
4+ Extract the <connection-id> from the <event: id>.
5+ Log "WebSocket client connected" to the <console>.
6+ Return an <OK: status> for the <connection>.
77}
88
99(Handle WebSocket Disconnect: WebSocket Event Handler) {
10- < Extract> the <connection-id> from the <event: connectionId>.
11- < Log> "WebSocket client disconnected" to the <console>.
12- < Return> an <OK: status> for the <disconnection>.
10+ Extract the <connection-id> from the <event: connectionId>.
11+ Log "WebSocket client disconnected" to the <console>.
12+ Return an <OK: status> for the <disconnection>.
1313}
You can’t perform that action at this time.
0 commit comments