Hello,
It would be amazing to see the Webserver DAT’s websocket callbacks (onWebsocketReceive Text/Binary/Ping/Pong) also include the URI these were received on.
This would make message “routing” to handlers much easier, without having to track connected clients
currently they look like:
def onWebSocketReceiveText(webServerDAT, client, data):
return
To maintain compatibility, this could be as follows, however the parameter order is a bit jank:
def onWebSocketReceiveText(webServerDAT, client, data, uri):
return
This would be better, but breaks backwards compatibility:
def onWebSocketReceiveText(webServerDAT, info, data):
# either a dict or an object.
# info = {
# 'client': currently what client is
# 'uri: uri client connected on
# not sure if there are other pertinent parameters for a client?
# }
return
Perhaps there could be a depreciation period, where there is a “Use Depreciated Callbacks” toggle on the Webserver DAT