Reworked SimplSockets to be much more robust and efficient