HW12/README.md

37 lines
870 B
Markdown
Raw Normal View History

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]...
2020-12-06 02:33:41 +09:00
./client SERVERNAME PORT [option] [FILENAME]...
2020-12-04 17:33:41 +09:00
```
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.
2020-12-06 02:33:41 +09:00
Client option and arguments:
- `-b` :benchmark mode
2020-12-04 18:08:49 +09:00
Available macro:
2020-12-05 10:25:54 +09:00
For server
- DEFAULT_MAX_LISTEN_SOCKET: 16
- DEFAULT_SERVER_PORT: 9091
- DEFAULT_MAX_PATH_SIZE: 256(must be less than 1000)
2020-12-04 17:33:41 +09:00
- USE_SENDFILE
2020-12-05 10:25:54 +09:00
- DEFAULT_SEND_FILE_CHUNK_SIZE: 0x100000(1MB)
2020-12-06 02:39:15 +09:00
- DEFAULT_WORK_QUEUE_SIZE(server only): 10
- DEFAULT_MAX_THREAD_NUMBER(server only): 10
- DEFAULT_RESPONSE_REQUEST(p-server only): 3(-1 is INF)
2020-12-05 10:25:54 +09:00
For client
2020-12-05 11:13:13 +09:00
- MUL_CLIENT(second unit)
- SLOW_CLIENT(microsecond unit, (buf_size/SLOW_CLIENT) bytes/usec)
2020-12-05 10:25:54 +09:00
- DEFAULT_PROGRESS_BAR_WIDTH: 30
For both
- TIMEOUT: 5(second unit)