Roughed out a lot of the logic, untested

- I'm having internet connection issues, wanted to commit while I could
- Was unable to thoroughly test this because of that, but it looks like
it should work (famous last words)
- named _sockselect because it uses sockets and select as opposed to any
of the other libraries, I'll try one of those later