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