Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the basic TCP server ground work. Some notes about this upload: We have decided to use forks instead of event driven polling, or POSIX threads, for each connection, since when using forks each connection will receive its own address space for variables, instead of sharing address space with POSIX threads. Also either forks or threads are much faster than event driven polling like select. We do however use POSIX threads to set a timeout to receive data from each connection (for security reasons) for each forked process. We try to use memcpy instead of append_string, wherever we can. This is because memcpy is faster since it can copy chunks of memory at once, instead of byte by byte since strcat needs to look for the null termination byte, thus it can only copy one bye at a time.
- Loading branch information