I have a function that handles an incoming TCP connection:
func Handle(conn net.Conn) error {
// ...
}
Also, I have an initialized gin router with implemented handles:
router := gin.New()
router.GET(...)
router.POST(...)
The router.Run(addr) call will start a separate HTTP server on the addr.
Is there any way to handle incoming connections inside the Handle function using this router without running a separate HTTP server?