How can I know which type of method uses websocket on Node js? UDP or TCP? And how can I change this? Or it depends on something else? I'm using server on node.js and client on javascript. I don't which type of protocol uses my connection. I want to UDP, because this is game-server. Thanks
-
How can you know, you can inspect the network requests that are made, I'll save you some time, WebSockets are TCPish (They make use of TCP but are not the same as a normal TCP request) and as far as I'm aware you can't change them to UDP as UDP is not very well supported by browsers.– GeorgeCommented May 2, 2017 at 9:00
-
1Such a sad information :( But thanks– VyacheslavCommented May 2, 2017 at 9:02
-
There's still no reason you can't use the for making a game, have a look at this answer here– GeorgeCommented May 2, 2017 at 9:05
Add a comment
|
1 Answer
Websockets are TCP. Here's a discussion of this issue in relation to gaming. There he covers websockets, webrtc (a possible choice for UDP, but complicated), quic (only in google chrome), and his netcode.io.