Added 'handshake' option to connect() method.

Thanks to Ezio Bonsi for suggesting the idea.