poll
says theres new data available on our socket- add data to the buffer
- Check for EOL in the new data
- If found, check state and hand off to the next routine
Connections have a current request (and probably current response). Requests have:
- Method (enum, why not)
- Target URI/path
- Header hash (think about multiple headers)
- Possible content (in memory vs cache to disk)
[This stack overflow answer] (https://stackoverflow.com/a/17905131/195833) shows how to do state machine functions (functions that return pointers to functions of their type)