move handshake to PeerWire