By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,671 Members | 1,556 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,671 IT Pros & Developers. It's quick & easy.

Listen TCp Port

P: n/a
hi all

i want to listen to a port to get the data passong throught it

for example to listen to port 80 to see all data the computer is
receiveing throught the http

how can i do that in dotnet.

thanx

Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>From what you've written, I can't tell if you want to receive
everything that being sent to and from port 80 on your computer or
what's being sent to/from port 80 on a remote computer between you and
him. I am assuming however from what you wrote that you would like
don't want your application to actually respond on port 80 but to just
listen to traffic that is occuring on port 80.

I believe there may be at least 2 different ways of doing this. The
first would be to use raw sockets. While this is possible, I can't
remember the first thing about doing it, and you would need to do some
searching to find a way.

The second way is to use one of the C# ports of winpcap. In the past I
used a slightly modified version of PACANAL
(http://www.codeproject.com/csharp/pacanal.asp) to accomplish this.
Unfortunately I lost the code I had written or I'd be more than glad to
share it with you. I'd reccomend checking into this.

If you'r looking to write a server that listens and responds on port
80, you need to look into using TCPListener, or Sockets. For this, look
at the documentation for System.Net and System.Net.Sockets.

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.