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
Asked
Active
Viewed 8,198 times
2
-
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. – George May 02 '17 at 09:00
-
1Such a sad information :( But thanks – Vyacheslav May 02 '17 at 09:02
-
There's still no reason you can't use the for making a game, have a look at this [answer here](http://stackoverflow.com/questions/8161053/are-websockets-suitable-for-real-time-multiplayer-games) – George May 02 '17 at 09:05
1 Answers
1
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.

Diagon
- 473
- 5
- 16