Homework
Go to file
2020-12-05 01:33:59 +00:00
.vscode add threadpool server 2020-12-05 01:30:30 +00:00
.gitignore add macro to change setting 2020-12-04 08:33:41 +00:00
client.c add client progress bar 2020-12-04 11:11:35 +00:00
hw12.c add base 2020-12-03 23:06:26 +00:00
LICENSE Initial commit 2020-12-04 07:28:31 +09:00
Makefile add threadpool server 2020-12-05 01:30:30 +00:00
p-client.c add threadpool server 2020-12-05 01:30:30 +00:00
p-server.c add threadpool server 2020-12-05 01:30:30 +00:00
pctest.sh add slow client 2020-12-04 10:10:40 +00:00
pstest.sh add threadpool server 2020-12-05 01:30:30 +00:00
README.md add threadpool server 2020-12-05 01:30:30 +00:00
server.c add threadpool server 2020-12-05 01:30:30 +00:00
simple_circular_buffer.h add threadpool server 2020-12-05 01:30:30 +00:00
socket_wrapper.c add threadpool server 2020-12-05 01:30:30 +00:00
socket_wrapper.h add macro to change setting 2020-12-04 08:33:41 +00:00

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)