Best practice to use WebSocket #79
-
Hi, I am asking my question here because there is no Discussions tabs on https://github.com/hummingbird-project/hummingbird-websocket. This is the first time I use Websocket via Swift-NIO and I am a bit lost. With Hummingbird I am not sure how I should implement this behaviour.
I wanted to create my own array of connected webSockets. When I may have mistunderstood how webSockets work with NIO. Does someone have already done this ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes the websocket code doesn't have any support for storing connections. I have left that up to you. The websocket chat example in hummingbird-examples has a basic connection manager https://github.com/hummingbird-project/hummingbird-examples/blob/main/websocket-chat/Sources/App/ConnectionManager.swift |
Beta Was this translation helpful? Give feedback.
Yes the websocket code doesn't have any support for storing connections. I have left that up to you. The websocket chat example in hummingbird-examples has a basic connection manager https://github.com/hummingbird-project/hummingbird-examples/blob/main/websocket-chat/Sources/App/ConnectionManager.swift