2
0
mirror of https://github.com/xvxx/phd synced 2024-11-12 07:10:45 +00:00

more notes

This commit is contained in:
dvkt 2019-12-27 21:53:07 -08:00
parent 71779156c8
commit f0457bfccc

View File

@ -9,8 +9,14 @@ use std::{
};
use threadpool::ThreadPool;
/// phd tries to be light on resources, so we only allow a low number
/// of simultaneous connections.
const MAX_WORKERS: usize = 10;
/// how many bytes of a file to read when trying to guess binary vs text?
const MAX_PEEK_SIZE: usize = 1024;
/// how many bytes to read() from the socket at a time.
const TCP_BUF_SIZE: usize = 1024;
/// Starts a Gopher server at the specified host, port, and root directory.