mercredi 1 avril 2015

WebRTC web application

Created WEBRTC web application it is working fine with (Socket.io and Peerjs) using nodejs as a default server for signalling. web application is deployed in tomcat7 locally problem here is when i try to run hostname as localhost application is working fine but when i change hostname to IP address m getting errors like


WebSocket connection to



'ws://Ipaddress:2013/socket.io/1/websocket/4Y_7W2fKGIrXToiXU-No' failed: Invalid frame header


same as in the case of peerjs. please let me know what can be done.


Peerjs Server component



var ip = require('ip');
var PeerServer = require('peer').PeerServer;

var port = 9000;
var server = new PeerServer({port: port, allow_discovery: true});

server.on('connection', function (id) {
console.log('new connection with id ' + id);
});

server.on('disconnect', function (id) {
console.log('disconnect with id ' + id);
});

console.log('peer server running on ' +
ip.address() + ':' + port);

Aucun commentaire:

Enregistrer un commentaire