Socket.io acknowledgment from client to server

1

I know that you can use callback functions in socket.io, an example is found in the link link

EXAMPLE

Customer

socket.emit('ferret', 'tobi', function (data) {
    console.log(data); 
});

Server

socket.on('ferret', function (name, fn) {
    fn('woot');
});

In this case, the callback function has the following address: server-to-client

What I am trying to unsuccessfully is that the callback function works from client to server

Thank you

    
asked by anonymous 29.04.2015 / 16:49

0 answers