1. Namespace
Separation to minimize the number of resources (TCP connections)
client
var qq = io . connect ( 'http://localhost:3000/qq' ) ; qq . on ( 'connect' , function ( ) { console . log ( "连接成功" ) } ) qq . on ( 'news' , function ( data
…
The post socketio namespace and room setup first appeared on Lenix Blog .
This article is reprinted from https://blog.p2hp.com/archives/9194
This site is for inclusion only, and the copyright belongs to the original author.