pomelonode / pomelo-jsclient-websocket

115 stars 75 forks source link

pomelo本身不是支持wss吗?为什么还要特地用反向代理的方式? #18

Open xiaobear250 opened 6 years ago

xiaobear250 commented 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了啊。。。这样会不会更优雅一点?还是说有什么我不知道的缺点?