Skip to content

Commit

Permalink
TCP server ground work
Browse files Browse the repository at this point in the history
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
zachhildreth committed Dec 31, 2018
1 parent c172384 commit f611117
Showing 1 changed file with 810 additions and 0 deletions.
Loading

0 comments on commit f611117

Please sign in to comment.