Changed visibility of server handshake's type
Completed handshake logic for client