add command line option for tcp server mode