79764775

Date: 2025-09-15 06:11:21
Score: 1.5
Natty:
Report link

You can using this lib for client version 4.x and future lastest

import (
    "net/http"
    "github.com/doquangtan/socketio/v4"
)

func main() {
    io := socketio.New()

    io.OnConnection(func(socket *socketio.Socket) {
        // ...
    })

    http.Handle("/socket.io/", io.HttpHandler())
    http.ListenAndServe(":3000", nil)
}

This lib server for golang supported client version 3, 4

https://socket.io/docs/v4/client-installation/

In client just add:

<script src="/socket.io/socket.io.min.js"></script>

In general socket.io tutorial https://socket.io/docs/v4/client-initialization/

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: John Dylan