Tagged Questions
0
votes
0answers
9 views
How do I verify origin url on einaros' ws websocket package
I've tired the code below it isn't worked:
var WebSocketServer = require('ws').Server;
var wsServer = new WebSocketServer({port: 8080});
wsServer.on('connection', function(ws) {
if (ws.origin ...
1
vote
1answer
11 views
Node: Distinguish between a reload event and a browser exit with socket event
I want to run some code when a a socket is closed but only if the user didn't reload the page...
I have something like
socket.on("close", function() {
//do something here
});
The problem is that ...
0
votes
1answer
29 views
onmessage event in websocket client is not getting fired
I am using node.js to implement websocket server and client. The handshake between them looks like this.
Request URL: ws://localhost:8015/
Request Method: GET
Status Code: 101 Switching Protocols
...
0
votes
1answer
28 views
Socket.io connection via IP address not working
I got a game working with socket.io. It's working fine when playing locally and via my IP address (not LAN but real IP) when connecting via my own computer.
However, when I give my IP and port to ...
2
votes
1answer
18 views
how to detect that user's connection is lost in nodejs websocket(ws)
I have already used
ws.on('close',function(){});
but in some case even it is not working like if user network is lost, or LAN has been disconnected.
So how can I check if user is connected or not, ...
0
votes
0answers
17 views
Can I use DNS with dnode.connect()
Im thinking of creating a Websocket-enabled App (on AWS) in which I offload the Application work from the Websocket Servers by calling dnode (to an Application Server) inside the Websocket Server ...
0
votes
0answers
29 views
Zombie session for websocket (NODEJS)?
How can I check for zombie session in websocket connection in nodejs?
I have created a chatting server and I wanted to check if the client is still connected to server. When a clients disconnects ...
0
votes
1answer
22 views
how to change other users socket properties?
I am using nodejs + socket.io and have chat. Every user, when enters chat, get some data to his socket. For example:
module.exports = function(io) {
var chat = io.of('/chat').on('connection', ...
0
votes
1answer
19 views
Strange socket.io.js error on client side
I'm getting these strange error during my attempts to get socket.io working.
Also, my socket.io.js file appears like this in chrome:
I know my socket.io.js file does not have this within it.
My ...
0
votes
2answers
39 views
Not able emit message after adding ssl over socket.io
I had built an application using Node JS and socket.io. It was working fine. Since I had to move the application over a secure connection, I changed the code to support SSL.
But, now I am unable to ...
-3
votes
0answers
19 views
Allowing a user to control a website with their phone using websockets
I'd like to create a video platform, which lets a user control the platform with their phone.
Basically, they would go to the site and be given an option to scan in a QR code (I know, urgh!) which ...
0
votes
2answers
42 views
how does socket.io send mess messages across multiple servers?
the socket.io api has the ability to send messages to all clients.
with one server and all sockets in memory i understand how that server one can send a message to all its clients, that's pretty ...
0
votes
3answers
41 views
Alternative Socket IO Client
I am trying to implement a device pairing program with nodejs. The server is implemented by someone else and uses socket io:
var http = require('http'),
io = require('socket.io');
But one of the ...
0
votes
2answers
42 views
Why did my browser cant connect to nodejs socket.io server?
My server side code is as below:
var app = require('http').createServer(handler)
, io = require('socket.io').listen(app)
app.listen(1000);
function handler (req, res) {
function (err, data) ...
0
votes
0answers
18 views
Extract a tls-socket (ssl) of https in NodeJS
I want to use nodejs to create a multiple server application:
https + websocket + ssl-socket. I manged to get the https- (+express) and the websocket-server (ws) to run on the same port.
Is there ...