kataras/neffos

[FEATURE REQUEST] export more events and authentication

オープン

#4 opened on 2019/07/12

 (23 件のコメント) (1 件のリアクション) (1 人の担当者)Go (53 件のフォーク)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (628 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド