From c8e274ef0d34a21031c10edce1690ed9fcacebe3 Mon Sep 17 00:00:00 2001 From: dicetrash Date: Thu, 3 Aug 2023 14:30:37 -0400 Subject: [PATCH] Update index.md There was confusion on connect vs connection --- docs/categories/01-Documentation/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/categories/01-Documentation/index.md b/docs/categories/01-Documentation/index.md index 48b64303..c676e25d 100644 --- a/docs/categories/01-Documentation/index.md +++ b/docs/categories/01-Documentation/index.md @@ -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) => { // ...