antelman107 / go-server-sent-events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server Sent Events implementation

To Run the server:

make run

One should see following in console output:

   ____    __
  / __/___/ /  ___
 / _// __/ _ \/ _ \
/___/\__/_//_/\___/ v3.3.10-dev
High performance, minimalist Go web framework
https://echo.labstack.com
____________________________________O/_______
                                    O\
⇨ http server started on [::]:1323

Then go to http://localhost:1323/static/index.html

One should see following:

alt text

TODO

  • allow multiple client connections (it is the only one connection currently)
    • must have subscribers storage
    • add/remove subscribers
    • remove subscriber on disconnect
  • graceful start/stop
  • minimalistic public interface (require only necessary data, such as request.Context().Done() channel, http.ResponseWriter)
  • add tests and benchmarks

About


Languages

Language:Go 85.2%Language:HTML 14.3%Language:Makefile 0.6%