Continuously listen to tcp port via terminal

Viewed 34028

Is it possible to listen to a port continuously?

I listen for incoming tcp notifications with following command

sudo nc -l -p 999

But as soon as notification arrives I have to restart listen with same command. Is it possible to listen to port without having to restart command when notifications arrives until user decides to abort listen?

2 Answers
Related