IXWebSocket/ws
2019-03-14 14:37:43 -07:00
..
cobra_publisher mv cobra_publisher under ws folder 2019-02-22 21:51:03 -08:00
ixcrypto Feature/http (#16) 2019-02-28 21:54:03 -08:00
.gitignore Feature/ws cli (#15) 2019-02-21 21:24:53 -08:00
broadcast-server.js cleanup 2019-02-22 20:51:22 -08:00
broadcast-server.py cleanup 2019-02-22 20:51:22 -08:00
CMakeLists.txt Feature/http (#16) 2019-02-28 21:54:03 -08:00
docker_build.sh ws broacast_server / can set serving hostname 2019-03-10 16:36:44 -07:00
README.md more ws doc 2019-02-28 22:07:45 -08:00
test_ws.sh do not busy loop while sending 2019-03-14 14:37:43 -07:00
ws_broadcast_server.cpp cleanup 2019-03-13 12:05:17 -07:00
ws_chat.cpp fix compiler warnings in ws command line tool 2019-03-04 13:56:30 -08:00
ws_connect.cpp fix compiler warnings in ws command line tool 2019-03-04 13:56:30 -08:00
ws_echo_server.cpp linux fix / linux still use event fd for now 2019-03-13 17:23:05 -07:00
ws_http_client.cpp readBytes does not read bytes one by one but in chunks 2019-03-02 21:11:16 -08:00
ws_ping_pong.cpp fix compiler warnings in ws command line tool 2019-03-04 13:56:30 -08:00
ws_receive.cpp send optimization + ws file transfer test 2019-03-14 13:47:03 -07:00
ws_send.cpp cleanup 2019-03-13 12:05:17 -07:00
ws_transfer.cpp linux fix / linux still use event fd for now 2019-03-13 17:23:05 -07:00
ws.cpp send optimization + ws file transfer test 2019-03-14 13:47:03 -07:00
ws.h linux fix / linux still use event fd for now 2019-03-13 17:23:05 -07:00

General

ws is a command line tool that should exercise most of the IXWebSocket code, and provide example code.

$ ws --help
ws is a websocket tool
Usage: ws [OPTIONS] SUBCOMMAND

Options:
  -h,--help                   Print this help message and exit

Subcommands:
  send                        Send a file
  receive                     Receive a file
  transfer                    Broadcasting server
  connect                     Connect to a remote server
  chat                        Group chat
  echo_server                 Echo server
  broadcast_server            Broadcasting server
  ping                        Ping pong
  curl                        HTTP Client

file transfer

# Start transfer server, which is just a broadcast server at this point
ws transfer # running on port 8080.

# Start receiver first
ws receive ws://localhost:8080 

# Then send a file. File will be received and written to disk by the receiver process
ws send ws://localhost:8080 /file/to/path

curl

$ ws curl --help
HTTP Client
Usage: ws curl [OPTIONS] url

Positionals:
  url TEXT REQUIRED           Connection url

Options:
  -h,--help                   Print this help message and exit
  -d TEXT                     Form data
  -F TEXT                     Form data
  -H TEXT                     Header
  --output TEXT               Output file
  -I                          Send a HEAD request
  -L                          Follow redirects
  --max-redirects INT         Max Redirects
  -v                          Verbose
  -O                          Save output to disk
  --compress                  Enable gzip compression
  --connect-timeout INT       Connection timeout
  --transfer-timeout INT      Transfer timeout