WIP
Adding the sock write and timeout stuff