helper for programming client, server TCP in a few line of code.