Create a TCP Client and Server and Send Messages with Netcat

netcat

This post shows how to create a TCP client and server and send messages between them using netcat v1.12 on Windows

Steps

1. Download netcat v1.12 for windows from http://eternallybored.org/misc/netcat/ (or click here to get it)

2. Open a CMD window

3. Create the server by typing this into the CMD window

nc -l -p 12345

4. Open another CMD window

5. Create the client by typing this into the CMD window you just opened:

nc localhost 12345

6. Type Hello, World in the client. You should see it in the server.

Good links

Reference