new: implemented optional websocket for /api/events

This commit is contained in:
evilsocket 2018-03-06 13:54:37 +01:00
parent b243e67828
commit 5ad1a17118
4 changed files with 66 additions and 36 deletions

View file

@ -33,6 +33,7 @@ func NewRestAPI(s *session.Session) *RestAPI {
server: &http.Server{},
quit: make(chan bool),
useWebsocket: false,
eventListener: s.Events.Listen(),
upgrader: websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,