Node JS TCP Socket Client Server Example

This example will show you how to use node js to implement TCP socket client-server communication. To achieve this you need to import node js built-in net module and use the net.createServer method to create a net.Server object as TCP server, and use net.createConnection method to create a net.Socket object as TCP client.