Netcat

In notebook:
FrontEndMasters Networking and Streams
Created at:
2017-09-23
Updated:
2017-09-30
Tags:
backend Fundamentals

$ nc -lp 1024 There are different distributions of netcat.

It lets you have a plain text session with a server, or be the server and type responses.

$ nc -lp 5000

It will just listen to incoming connections.

or if that doesn't work try:

$ nc -l 5000

then connect to your server in another terminal:

$ nc localhost 5000

Type messages in each session and see the messages on the other session.

So this works a bit like a chat program. This is how more or less protocols and clients work. But of course with more conventions.

You can have multiple clients connected. With a NodeJS server for example. (50-10 000 connections)