kataras/neffos

[FEATURE REQUEST] export more events and authentication

Aperta

#4 aperta il 12 lug 2019

 (23 commenti) (1 reazione) (1 assegnatario)Go (53 fork)github user discovery
enhancementgood first issue

Metriche repository

Star
 (628 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor