Fix an off by one error
Add test to make sure it never happens again
Make Socket.prototype.connect
build client