Close the transport in client/serverCodec