Handshake now accept identity which is not empty
clean the exit of decoder,encoder and handshake
decoder now do batch decoding