You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current way to set up a WebSocket connection via the BotFrameworkAdapter is to use processActivity(req, res, logic: async (context) => Promise<any>) which may call useWebSocket(req, res, logic: async (context) => Promise<any>).
The problem with the current implementation is that it ties useWebSocket() to the restify framework, which helpfully exposes the socket and head via ServerUpgradeResponse.claimUpgrade() method.
Other web service frameworks do not offer the same helper code.
The one shared feature most Node.js Web libraries offer is a way to listen for the "upgrade" event emitted from the http.Server.
Describe the solution you'd like
A low level entry-point for useWebSockets(). The updated signature may look like the following:
The current preview high-level entry-point BotFrameworkAdapter.processActivity() would not be used for WebSockets, only for regular HTTP requests.
Additional notes
Upgrade requests for WebSockets from Direct Line Speech only come in with GET requests. In the code, we would begin the authentication process if it's a valid Upgrade request using the GET method.
Requests with non-GET methods would simply pass through BotFrameworkAdapter.useWebSockets()
Is your feature request related to a problem? Please describe.
The current way to set up a WebSocket connection via the BotFrameworkAdapter is to use
processActivity(req, res, logic: async (context) => Promise<any>)
which may calluseWebSocket(req, res, logic: async (context) => Promise<any>)
.The problem with the current implementation is that it ties useWebSocket() to the restify framework, which helpfully exposes the
socket
andhead
viaServerUpgradeResponse.claimUpgrade()
method.Other web service frameworks do not offer the same helper code.
The one shared feature most Node.js Web libraries offer is a way to listen for the
"upgrade"
event emitted from thehttp.Server
.Describe the solution you'd like
A low level entry-point for
useWebSockets()
. The updated signature may look like the following:The current preview high-level entry-point
BotFrameworkAdapter.processActivity()
would not be used for WebSockets, only for regular HTTP requests.Additional notes
Upgrade requests for WebSockets from Direct Line Speech only come in with GET requests. In the code, we would begin the authentication process if it's a valid Upgrade request using the GET method.
Requests with non-GET methods would simply pass through
BotFrameworkAdapter.useWebSockets()
@christopheranderson, @carlosscastro, @DDEfromOR
The text was updated successfully, but these errors were encountered: