Browse Source

Fixing to be compatable with newer WebSocket implementation.

Jay Sistar 10 years ago
parent
commit
fd09cd81fd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      WebSocketExample/Resources/Scripts/main.js

+ 1 - 1
WebSocketExample/Resources/Scripts/main.js

@@ -23,7 +23,7 @@ ws.subscribeToEvent("open", function() {
 // Listen for messages
 // Listen for messages
 ws.subscribeToEvent("message", function (event) {
 ws.subscribeToEvent("message", function (event) {
 
 
-    console.log("WebSocket Message: " + event.data);
+    console.log("WebSocket Message: " + event.message.readString());
 
 
     // We would normally keep the WebSocket open for a long time, but
     // We would normally keep the WebSocket open for a long time, but
     // here we are demonstrating how to use ws.openAgain() below, so
     // here we are demonstrating how to use ws.openAgain() below, so