Wednesday, 12 April 2017

WebSocket server can't receive message sended from ios client

I use ws to implement WebSocket Server and i successfully send message to my ios client(use SocketRocket ).However i can't send message to server or maybe server can't receive message sended from ios client.

WebSocket Server:

const WebSocket = require('ws');

const wss = new WebSocket.Server({port: 8080});

wss.on("connection", function connection(ws) {
    ws.on('message,', function incoming(message) {
        console.log('received: %s', message);
    });
    ws.send("something");
});

I want to implement a websocket server that can exchange data with ios client.



via user7238980

No comments:

Post a Comment