Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julienschmidt/sse
HTML5 Server-Sent-Events for Go
https://github.com/julienschmidt/sse
events go golang http javascript server-sent-events sse
Last synced: 16 days ago
JSON representation
HTML5 Server-Sent-Events for Go
- Host: GitHub
- URL: https://github.com/julienschmidt/sse
- Owner: julienschmidt
- License: mit
- Created: 2015-05-27T17:52:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-14T04:02:50.000Z (over 1 year ago)
- Last Synced: 2024-06-18T20:07:15.395Z (5 months ago)
- Topics: events, go, golang, http, javascript, server-sent-events, sse
- Language: Go
- Homepage: https://godoc.org/github.com/julienschmidt/sse
- Size: 15.6 KB
- Stars: 99
- Watchers: 7
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SSE - Server-Sent Events
[![Build Status](https://travis-ci.org/julienschmidt/sse.svg)](https://travis-ci.org/julienschmidt/sse) [![Coverage](http://gocover.io/_badge/github.com/julienschmidt/sse?0)](http://gocover.io/github.com/julienschmidt/sse) [![GoDoc](https://godoc.org/github.com/julienschmidt/sse?status.svg)](https://godoc.org/github.com/julienschmidt/sse)[HTML5 Server-Sent Events](http://www.w3.org/TR/eventsource/) for Go
## Why you should use Server-Sent-Events
- No need to implement custom protocol (WebSockets), it just uses HTTP
- Convenient JavaScript API, fires easy to handle Events
- Auto-Reconnects
- Unlike WebSockets, only unidirectional (server -> client)## ToDo
- ID handling
- Improve Client Channel buffering## Further Readings
- http://www.w3.org/TR/eventsource/
- http://html5doctor.com/server-sent-events/
- http://www.html5rocks.com/en/tutorials/eventsource/basics/
- https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events