New answers tagged

2

I don't think the WebSockets protocol has the speed that you'd be looking for in a real-time game. "The technique is effective, but is not well suited for applications that have sub-500 millisecond latency or high throughput requirements." Websockets are built on top of TCP, which ensures that every packet of information is received by the client. Do you ...


1

The server receives the connect event when the client connects to the socket.io server. At this point, you can implement a simple verification to make sure that the person connected is supposed to be using your application. To do so, the next event the client must send is a sign in event with some credentials (a token, for example). You can then validate ...


0

After a bit of a research regarding Socket.io I realised you can control the origin that is connecting to your game (The Client) using the origin option, you can read about it over here - Socket.IO server API. if I understood you correctly you wish to control the connections and you want to accept connections only from a specific uri (correct me if i'm ...


1

If you have access to the box you're connecting to, couldn't you add a firewall policy to only allow a specific domain? If you don't have access to the box directly, perhaps whatever hosting service you're using allows some form of firewall control for access to your endpoint? As far as I know, that's the only way to truly prevent connections. There are ...


1

There are 2 things that I think might make this run faster: 1) Limit the number of images you're attempting to send (e.g. the FPS) (Unity is single threaded, so everything you do has an impact on performance) 2) Make the resulting JPG smaller by scaling the image before Base64 encoding it There are a number of ways to reduce the frame rate, but possibly ...



Top 50 recent answers are included