Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/categories/01-Documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ const socket = io("ws://localhost:3000");
// send a message to the server
socket.emit("hello from client", 5, "6", { 7: Uint8Array.from([8]) });

// When the connection to the server is established, not to be confused with on connection, which is the server event.
socket.on("connect", () => {
// ...
}

// receive a message from the server
socket.on("hello from server", (...args) => {
// ...
Expand Down