Implement the protocol for connecting to host