Skip to content

Instantly share code, notes, and snippets.

View zhaohansprt's full-sized avatar
🏠
Working from home

zhaohansprt

🏠
Working from home
View GitHub Profile
@zhaohansprt
zhaohansprt / sse.go
Last active July 18, 2017 03:47 — forked from schmohlio/sse.go
Example SSE server in Golang
// v2 of the great example of SSE in go by @ismasan.
// includes fixes:
// * infinite loop ending in panic
// * closing a client twice
// * potentially blocked listen() from closing a connection during multiplex step.
package main
import (
"fmt"
"log"