Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 5549  / 3 Years ago, mon, august 23, 2021, 6:26:29

I am writing an app for my phone which streams data to a specific port, but I am having problems and looking for a way to listen to a port on my Kubuntu 11.10 machine for incoming traffic. Does anyone know a program which will show me if there is any data coming in on a specific port and how much?


More From » networking

 Answers
6

A quick and dirty solution can be to use netcat:



nc -l port-number


-l for listening. May need admin privileges for listening on a port number lesser than 1024. Received data will be sent on stdout, so you may need redirection or piping to another command to use the data.



Also, the command should be active before some remote program connect to the port, otherwise the sending program will fail.



For more information, see netcat man page.


[#42625] Tuesday, August 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ainlyyor

Total Points: 210
Total Questions: 129
Total Answers: 116

Location: Barbados
Member since Sun, Nov 27, 2022
1 Year ago
;