2019-03-01 07:03:48 +01:00
|
|
|
# General
|
|
|
|
|
|
|
|
ws is a command line tool that should exercise most of the IXWebSocket code, and provide example code.
|
|
|
|
|
|
|
|
## file transfer
|
|
|
|
|
2019-02-22 06:24:53 +01:00
|
|
|
```
|
2019-02-23 06:53:29 +01:00
|
|
|
# Start transfer server, which is just a broadcast server at this point
|
2019-03-01 07:03:48 +01:00
|
|
|
ws transfer # running on port 8080.
|
2019-02-23 06:53:29 +01:00
|
|
|
|
2019-02-22 06:24:53 +01:00
|
|
|
# Start receiver first
|
2019-03-01 07:03:48 +01:00
|
|
|
ws receive ws://localhost:8080
|
2019-02-22 06:24:53 +01:00
|
|
|
|
2019-02-23 06:53:29 +01:00
|
|
|
# Then send a file. File will be received and written to disk by the receiver process
|
2019-03-01 07:03:48 +01:00
|
|
|
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
|
2019-02-22 06:24:53 +01:00
|
|
|
```
|