File: websocket_client.htt

package info (click to toggle)
httest 2.4.23-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,876 kB
  • sloc: ansic: 19,553; sh: 10,550; xml: 1,047; makefile: 510; lisp: 145; perl: 31
file content (20 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This script connect to echo.websocket.org and send a "hallo welt" and receive
# the echo "hallo welt".

CLIENT
  _REQ echo.websocket.org 80
  __GET / HTTP/1.1
  __Upgrade: websocket
  __Connection: Upgrade
  __Host: echo.websocket.org
  __Origin: http://websocket.org
  __Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
  __Sec-WebSocket-Version: 13
  __
  _WAIT
  _WS:SEND FIN,TEXT AUTO "hallo welt" 0x12345678
  _WS:RECV OP LEN
  _DEBUG $OP $LEN
  _CLOSE
END