File tree Expand file tree Collapse file tree
NativeWebSocket/Assets/WebSocket Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ var LibraryWebSocket = {
137137 */
138138 WebSocketAllocate : function ( url ) {
139139
140- var urlStr = Pointer_stringify ( url ) ;
140+ var urlStr = UTF8ToString ( url ) ;
141141 var id = webSocketState . lastId ++ ;
142142
143143 webSocketState . instances [ id ] = {
@@ -158,7 +158,7 @@ var LibraryWebSocket = {
158158 */
159159 WebSocketAddSubProtocol : function ( instanceId , subprotocol ) {
160160
161- var subprotocolStr = Pointer_stringify ( subprotocol ) ;
161+ var subprotocolStr = UTF8ToString ( subprotocol ) ;
162162 webSocketState . instances [ instanceId ] . subprotocols . push ( subprotocolStr ) ;
163163
164164 } ,
@@ -311,7 +311,7 @@ var LibraryWebSocket = {
311311 if ( instance . ws . readyState === 3 )
312312 return - 5 ;
313313
314- var reason = ( reasonPtr ? Pointer_stringify ( reasonPtr ) : undefined ) ;
314+ var reason = ( reasonPtr ? UTF8ToString ( reasonPtr ) : undefined ) ;
315315
316316 try {
317317 instance . ws . close ( code , reason ) ;
@@ -365,7 +365,7 @@ var LibraryWebSocket = {
365365 if ( instance . ws . readyState !== 1 )
366366 return - 6 ;
367367
368- instance . ws . send ( Pointer_stringify ( message ) ) ;
368+ instance . ws . send ( UTF8ToString ( message ) ) ;
369369
370370 return 0 ;
371371
You can’t perform that action at this time.
0 commit comments