mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-22 20:07:14 +02:00
First steps to do async
This commit is contained in:
@ -41,11 +41,11 @@ wsServer.on('request', function(request) {
|
||||
connection.on('message', function(message) {
|
||||
if (message.type === 'utf8') {
|
||||
console.log('Received Message: ' + message.utf8Data);
|
||||
connection.sendUTF(message.utf8Data);
|
||||
// connection.sendUTF(message.utf8Data);
|
||||
}
|
||||
else if (message.type === 'binary') {
|
||||
console.log('Received Binary Message of ' + message.binaryData.length + ' bytes');
|
||||
connection.sendBytes(message.binaryData);
|
||||
//connection.sendBytes(message.binaryData);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user