FTC (fault tolerant connection) is an engine.io-compatible library that provides fault tolerant, persistent client-server connections.
A basic echo server is shown below and is compatible with the engine-io example.
package main
import (
"io"
"log"
"net/http"
"github.com/poptip/ftc"
)
func EchoServer(c *ftc.Conn) {
io.Copy(c, c)
}
func main() {
http.Handle("/engine.io/", ftc.NewServer(nil, ftc.Handler(EchoServer)))
log.Println("Serving at localhost:5000...")
log.Fatal(http.ListenAndServe(":5000", nil))
}