quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test2302 (1167B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 WebSockets
      5 </keywords>
      6 </info>
      7 
      8 #
      9 # Sends a PING + a 5 byte hello TEXT
     10 <reply>
     11 <data nocheck="yes" nonewline="yes">
     12 HTTP/1.1 101 Switching to WebSockets
     13 Server: test-server/fake
     14 Upgrade: websocket
     15 Connection: Upgrade
     16 Something: else
     17 Sec-WebSocket-Accept: HkPsVga7+8LuxM4RGQ5p9tZHeYs=
     18 
     19 %hex[%89%00%81%05hello]hex%
     20 </data>
     21 # allow upgrade
     22 <servercmd>
     23 upgrade
     24 </servercmd>
     25 </reply>
     26 
     27 #
     28 # Client-side
     29 <client>
     30 # require debug for the forced CURL_ENTROPY
     31 <features>
     32 Debug
     33 ws
     34 </features>
     35 <server>
     36 http
     37 </server>
     38 <name>
     39 WebSockets via callback (frame mode) + curl_ws_send()
     40 </name>
     41 <tool>
     42 lib%TESTNUMBER
     43 </tool>
     44 <command>
     45 ws://%HOSTIP:%HTTPPORT/%TESTNUMBER
     46 </command>
     47 </client>
     48 
     49 #
     50 # PONG with no data and the 32 bit mask
     51 #
     52 <verify>
     53 <protocol nocheck="yes" nonewline="yes">
     54 GET /%TESTNUMBER HTTP/1.1
     55 Host: %HOSTIP:%HTTPPORT
     56 User-Agent: webbie-sox/3
     57 Accept: */*
     58 Upgrade: websocket
     59 Connection: Upgrade
     60 Sec-WebSocket-Version: 13
     61 Sec-WebSocket-Key: NDMyMTUzMjE2MzIxNzMyMQ==
     62 
     63 %hex[%8a%808321]hex%
     64 </protocol>
     65 <stdout mode="text">
     66 68 65 6c 6c 6f 
     67 RECFLAGS: 1
     68 </stdout>
     69 <limits>
     70 Maximum allocated: 1300000
     71 </limits>
     72 </verify>
     73 </testcase>