kataras/neffos

[FEATURE REQUEST] export more events and authentication

開放

#4 建立於 2019年7月12日

 (23 則留言) (1 個反應) (1 位負責人)Go (53 個分叉)github user discovery
enhancementgood first issue

倉庫指標

星標
 (628 顆星)
PR 合併指標
 (30 天內沒有已合併 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

貢獻者指南