a simple example of TCP socket