无法使用nodejs中的https连接套接字

在使用nodejs开发一个聊天应用程序的时候,我试图通过使用http命名空间的帮助来连接套接字,这是完全正常的。虽然我使用https运行相同的应用程序,但是没有连接到套接字代码。

服务器

require('./libs/socketioCode.js').sockets(https); var options = { key: fs.readFileSync('privkey.pem'), cert: fs.readFileSync('cert.pem') }; var server = http.createServer(app).listen(3000); var server1 = https.createServer(options, app).listen(3443); var io = require('socket.io').listen(server1); 

sockets

 module.exports.sockets = function(https){ io = socketio.listen(https); 

我试过这个代码使用很多方法,但我failed.i得到错误,如GET /socket.io/?EIO=2&transport=polling&t=1505985336768-986 200 17.325 ms - 1454 Page Not Found 。提前GET /socket.io/?EIO=2&transport=polling&t=1505985336768-986 200 17.325 ms - 1454 Page Not Found