make the packing faster

two small changes:
1. in the publish method, remove the packString which is time cost for string operation. I have tested in my project. Up to now, no problem happened. But I'm not sure if packString is more safe.
2. gethostname() is much faster then exec()