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
{{ message }}
This repository was archived by the owner on Apr 7, 2022. It is now read-only.
Since the rest of Vapor is very asynchronous with many tasks returning futures, it makes it difficult to work with web sockets. Maybe this just requires more examples in the documentation, though it would be nice if web sockets got some love like the rest of Vapor.
If you need to do a query in one of the following examples, there is no where to return the future. I've run in to leaking promises and other issues because of this.
func onUpgrade(ws:WebSocket, req:Request)throws
ws.onText{(ws, text)in
// no where to return future
}