Different ways of creating TCP client