2020-12-04 07:28:31 +09:00
|
|
|
# HW12
|
|
|
|
|
2020-12-04 17:33:41 +09:00
|
|
|
Homework
|
|
|
|
|
|
|
|
To build source, you should install `build-essential`.
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
```bash
|
|
|
|
./server [OPTION]...
|
|
|
|
./client SERVERNAME PORT FILENAME
|
|
|
|
```
|
|
|
|
|
2020-12-04 18:08:49 +09:00
|
|
|
Server OPTION and arguments:
|
|
|
|
- `-p port` :set to port binding. couldn't set to 0
|
|
|
|
- `-h` :print help message.
|
|
|
|
|
|
|
|
Available macro:
|
2020-12-04 17:33:41 +09:00
|
|
|
- DEFAULT_SERVER_PORT : 9091
|
|
|
|
- DEFAULT_MAX_PATH_SIZE : 256(must be less than 1000)
|
|
|
|
- TIMEOUT : 5(second unit)
|
|
|
|
- USE_SENDFILE
|
2020-12-04 19:10:40 +09:00
|
|
|
- DEFAULT_SEND_FILE_CHUNK_SIZE : 0x100000(1MB)
|
|
|
|
- SLOW_CLIENT(second unit)
|