I'm not new in Swift, but new in Vapor server side development. I'm trying to make simple chat app, using multiple rooms 1:1 using Sockets. I'm able to make single room for multiple connections, but I'm not getting logic how to make rooms 1:1. Should be single socket with routing, or one socket per room, could someone show me example and explain logic please? As client I did simple iOS app, so I'm able to connect to server and able to write messages using single socket.
Asked
Active
Viewed 391 times
1 Answers
2
Based on vapor-community chat example, it seems the good practice is one WebSocket per user per room.
Anyway, you can take this repo as an example of a working chat app.

Magiguigui
- 151
- 2
- 13