Monitoring a port in Windows and logging the traffic into a file

Hello,

I have a little knowledge in c++ programming. Now I am in need of creating a program/service to monitor a port and log all the traffic(happening in it) to a txt file.

Is there a way to do it?

If yes, pls help me on it...

Thanks in advance.
There are many utilities already available, Wireshark is one such software

It is an open source program so you can check the code of Wireshark on how it does it

If your program is using that port then you can modify to log everything received and sent on that port
Topic archived. No new replies allowed.