3 ms·
How does it work for websockets? Do you have to spawn one process per connection?
by noncoml 8y ago
How does it work for websockets? Do you have to spawn one process per connection?
- detaro 8y agoIn such cases, websockets generally aren't handled by the application itself, but by a server (e.g. the nginx in front of the app with plugins, or an extra server) that manages the connections, often provides "channels" and takes commands from the application.
- judge2020 8y agoYep, which is why Laravel [0], CakePHP [1], etc prefer to use a node app or separate server to handle WebSocket connections that then use an internal router to call PHP code. 0: https://laravel.com/docs/5.6/broadcasting#driver-prerequisites https://laravel.com/docs/5.6/broadcasting#driver-prerequisit... 1: https://github.com/scherersoftware/cake-websocket https://github.com/scherersoftware/cake-websocket