Code examples from the book <Working with TCP Socket>