Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can ServiceStack support websockets?

Servicestack is awesome. I'm using it for my Xamarin projects (monotouch and monodroid).

Users login and authorised by ServiceStack. The session details are kept in memory i.e. userId, Ipaddress, etc.

But what would be the best way to add websocket functionality so I could push notifications to these users?

Or would it be better to just leave a regular websocket open on the client and have a small websocket server somehow read the session data (user Ipaddress) from ServiceStack in order to relay bespoke messages to client?

like image 456
fractal Avatar asked Oct 04 '22 13:10

fractal


1 Answers

As an alternative to Web Sockets ServiceStack supports Server Sent Events for real-time event notifications. All the Chat Apps in the Live Demos utilizes Server Events for its real-time communication.

But it doesn't include any support for Web Sockets itself, although here's an example of using ServiceStack and SignalR in the same project.

like image 63
mythz Avatar answered Oct 07 '22 19:10

mythz