Help us shape the future of Go! Take the 2026 Go Developer Survey

auth-and-ack

command
v1.3.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Example: Socket.IO server with handshake auth, listener-side payload.Ack, server-initiated EmitWithAckTimeout, and graceful Shutdown(ctx) on SIGINT/SIGTERM.

Client (socket.io-client v4):

const s = io("http://localhost:3000", {
    path: "/ws",
    transports: ["websocket"],
    auth: { token: "secret" },
});
s.emit("hello", "world", (reply) => console.log("ack:", reply));
s.on("ping", (n, cb) => cb("pong-" + n));

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL