kataras/neffos

[FEATURE REQUEST] export more events and authentication

Open

#4 opened on Jul 12, 2019

 (23 comments) (1 reaction) (1 assignee)Go (53 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (628 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Is your feature request related to a problem? Please describe.

1, I tried neffos, it works great, but seems it only focused on Message event. But for app layer, maybe want to collect some information about: connection count, each connection startTime and endTime, last activeTime, and so on.

2, send broadcast PING from server to all client. For mobile network, APP may hibernate at background, which can't send PING. so need server to send PING to remain the TCP connection and APP alive.

3, able to do authentication when websockt upgrade, like pass the http.Request and return a simple true or false. so the app layer can read url and param from http.Request. for example: http://xxxx/ws/endpoint?uid=aaa&token=bbb

Describe the solution you'd like 1, export some event for each connection, like: CONNECT, CLOSE, ACTIVE(stand for: message, ping, pong) ......

2, able to broadcast PING

3, export handler for authentication, which default return true

Contributor guide