parse packet from the data
parse from the handshake packet and switch stage using it