Skip to content

Commit 324ba0e

Browse files
committed
changed names of functions in websocket.js
1 parent fa25796 commit 324ba0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

websocket.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ include([], function() {
55
this.connectInterval = null;
66
this.serialport = '';
77
var ws = null;
8-
this.messageCallback = function(evt) {};
8+
this.onMessage = function(evt) {};
99

10-
this.connectCallback = function() {};
10+
this.onConnect = function() {};
1111

1212
this.send = function(msg) {};
1313

@@ -19,9 +19,9 @@ include([], function() {
1919
{
2020
// Web Socket is connected, send data using send()
2121
clearInterval(_this.connectInterval);
22-
_this.connectCallback();
22+
_this.onConnect();
2323
ws.onmessage = function(evt) {
24-
_this.messageCallback(evt);
24+
_this.onMessage(evt);
2525
};
2626
};
2727

0 commit comments

Comments
 (0)