File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 37
37
function openConnection ( ) {
38
38
// uses global 'conn' object
39
39
if ( conn . readyState === undefined || conn . readyState > 1 ) {
40
- conn = new WebSocket ( 'ws ://node.remysharp.com:8001 ' ) ;
40
+ conn = new WebSocket ( 'wss ://remy-ws.glitch.me/ ' ) ;
41
41
conn . onopen = function ( ) {
42
42
state . className = 'success' ;
43
43
state . innerHTML = 'Socket open' ;
52
52
connected . innerHTML = message ;
53
53
}
54
54
} ;
55
-
55
+
56
56
conn . onclose = function ( event ) {
57
57
state . className = 'fail' ;
58
58
state . innerHTML = 'Socket closed' ;
84
84
} , 250 ) ;
85
85
}
86
86
} ;
87
-
87
+
88
88
addEvent ( form , 'submit' , function ( event ) {
89
89
event . preventDefault ( ) ;
90
90
91
91
// if we're connected
92
92
if ( conn . readyState === 1 ) {
93
93
conn . send ( JSON . stringify ( chat . value ) ) ;
94
94
log . innerHTML = '<li class="you">' + chat . value . replace ( / [ < > & ] / g, function ( m ) { return entities [ m ] ; } ) + '</li>' + log . innerHTML ;
95
-
95
+
96
96
chat . value = '' ;
97
97
}
98
98
} ) ;
99
99
100
- openConnection ( ) ;
100
+ openConnection ( ) ;
101
101
}
102
102
103
- </ script >
103
+ </ script >
You can’t perform that action at this time.
0 commit comments