Open xiaobear250 opened 6 years ago
在game-server的app.js中如下配置: ``// app configuration app.configure('production|development', 'connector', function(){ app.set('connectorConfig', { connector : pomelo.connectors.hybridconnector, heartbeat : 3, useDict : true, useProtobuf : true, ssl: { type: 'wss', key: fs.readFileSync("密钥位置"), cert: fs.readFileSync("证书位置") } }); });
然后把本项目main.js中的15行改掉,就可以直接使用wss来连接pomelo了啊。。。这样会不会更优雅一点?还是说有什么我不知道的缺点?
在game-server的app.js中如下配置: ``// app configuration app.configure('production|development', 'connector', function(){ app.set('connectorConfig', { connector : pomelo.connectors.hybridconnector, heartbeat : 3, useDict : true, useProtobuf : true, ssl: { type: 'wss', key: fs.readFileSync("密钥位置"), cert: fs.readFileSync("证书位置") } }); });
然后把本项目main.js中的15行改掉,就可以直接使用wss来连接pomelo了啊。。。这样会不会更优雅一点?还是说有什么我不知道的缺点?