Refactored TCP/Unix socket code.
Reformatted sources with new uncrustify.cfg.