implement publish
optimize code.
reset client on reconnection.
improve subscriber, update readme.