Wait for writeable, rather than readable, socket on connect.
Merge pull request #157 from mortehu/master

Wait for writeable, rather than readable, socket on connect.