3 ms·
Is there any reason to use WebSockets on native apps other than if you want to share one server between native and web?
by tlrobinson 15y ago
Is there any reason to use WebSockets on native apps other than if you want to share one server between native and web?
- nupark2 15y agoOnly reason I can think of is to traverse firewalls that block outbound sockets but don't block HTTP+WebSocket. That aside, it seems a bit ridiculous, given that we already have sockets, to bolt on a protocol that exists almost solely to work around security issues involved in a browser opening a socket.
- mikelikespie 15y agoI think it's the same reason you would want to use good old HTTP over raw sockets for a request/response API, even though with a native client you could just invent your own protocol. If you want bidirectional communication to your app, it's much easier to make a server that uses the WebSocket Protocol (tornado, etc.) instead of rolling your own server and protocol.
- deleted 15y ago[deleted]