How to use googollee/ with gin gonic

So i want to know how to have and use it with gin gonic

package main

import (
func main() {
    r := gin.Default()
    r.GET("/ping", socketioFunc)
    r.Run() // listen and serve on (for windows "localhost:8080")

func socketioFunc(c *gin.Context) {
	c.JSON(200, gin.H{
		"message": "pong",

Is this working? If not, what does not work?

Hello, the code is mising becouse i don’t know how yo implement .

There are examples for how to use Maybe it is possible to register a socket-io Server with Gin as it is done with http.Handle in the example. But this would happen in main, not in socketioFunc.

Yeah, but i have to used it with gin gonic and has to be in anotehr function

Good luck.

Meaning: “I have to” will probably not be enough to convince the libraries to do something (what exactly?) they are not designed for.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.