Emit and Broadcast JSON using Socket.io and JS/ES5
Запись от 8Observer8 размещена 17.02.2019 в 18:36
Показов 1529
Комментарии 1
Метки javascript, json, socket.io
|
Blog content I will show differences between "emit" and "broadcast" on server side. In short:
At first time create a connection between the server and the client using this instruction: 101. Socket.io Connection, JS/ES5 We have this callback function in "app.js":
Install "shortid" package. Type this command in the console from your project folder: npm install --save shortid We will use "shortid" module to generate a random unique name. Let's show generated name: app.js
app.js
| |||||||||||||||||||||
Метки javascript, json, socket.io
Размещено в Без категории
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
Всего комментариев 1
Комментарии
-
Next part: Deploying Game Server on HerokuЗапись от 8Observer8 размещена 17.02.2019 в 20:58


