Skip to content

poptip/ftc

Repository files navigation

FTC Build Status GoDoc

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))
}

About

FTC is a Go library that provides fault-tolerant, persistent client-server connections.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages