Homework
.vscode | ||
.gitignore | ||
client.c | ||
hw12.c | ||
LICENSE | ||
Makefile | ||
p-client.c | ||
p-server.c | ||
pctest.sh | ||
pstest.sh | ||
README.md | ||
server.c | ||
simple_circular_buffer.h | ||
socket_wrapper.c | ||
socket_wrapper.h |
HW12
Homework
To build source, you should install build-essential
.
Usage:
./server [OPTION]...
./client SERVERNAME PORT FILENAME
Server OPTION and arguments:
-p port
:set to port binding. couldn't set to 0-h
:print help message.
Available macro: For server
- DEFAULT_MAX_LISTEN_SOCKET: 16
- DEFAULT_SERVER_PORT: 9091
- DEFAULT_MAX_PATH_SIZE: 256(must be less than 1000)
- USE_SENDFILE
- DEFAULT_SEND_FILE_CHUNK_SIZE: 0x100000(1MB)
- DEFAULT_WORK_QUEUE_SIZE: 10
- DEFAULT_MAX_THREAD_NUMBER: 10 For client
- SLOW_CLIENT(second unit)
- DEFAULT_PROGRESS_BAR_WIDTH: 30 For both
- TIMEOUT: 5(second unit)