So, the above network code was totally broken... why? Well, I was sending data between the server/client and reading on each end using readline(). My issue was that I forgot to add a newline character at the end of my string so the server was throwing the client data out and waiting for new data... Over an hour of debugging because I forgot to append one freaking character!
Lesson learned: when dealing with networking, multi-threading, or a combination of the two, 99% right is no better than 100% wrong.
Lesson learned: when dealing with networking, multi-threading, or a combination of the two, 99% right is no better than 100% wrong.