File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 221221 }
222222 binary_state = 0 ;
223223 break ;
224+ case 31 :
225+ // first (and last) response for GET_VER
226+ console . log ( 'GET_VER' , data ) ;
227+ binary_state = 0 ;
228+ break ;
224229 }
225230 }
226231 term . write ( event . data ) ;
300305 ws . send ( rec ) ;
301306}
302307
308+ function get_ver ( ) {
309+ // WEBREPL_REQ_S = "<2sBBQLH64s"
310+ var rec = new Uint8Array ( 2 + 1 + 1 + 8 + 4 + 2 + 64 ) ;
311+ rec [ 0 ] = 'W' . charCodeAt ( 0 ) ;
312+ rec [ 1 ] = 'A' . charCodeAt ( 0 ) ;
313+ rec [ 2 ] = 3 ; // GET_VER
314+ // rest of "rec" is zero
315+
316+ // initiate GET_VER
317+ binary_state = 31 ;
318+ ws . send ( rec ) ;
319+ }
320+
303321function handle_put_file_select ( evt ) {
304322 // The event holds a FileList object which is a list of File objects,
305323 // but we only support single file selection at the moment.
You can’t perform that action at this time.
0 commit comments