4.1.7 服务器适配器值 server_adapter_value
value
(Adapter)Returns
Server|Adapter
设置适配器值
。默认为socket.io随附的基于内存的Adapter
实例。见socket.io-adapter 。如果没有提供参数,此方法将返回当前值。
const io= require('socket.io')(3000);
const redis= require('socket.io-redis');
io.adapter(redis({host:"localhost",port:6379}));
Last updated
Was this helpful?