views:

29

answers:

1

Is out there any sample of reading http requests using TCP socket collecting data from them (like emulating Http server in some way) so I wanna to keep data like senders IP:PORT, request body and so on.

So has any one seen such thing in OpenSource projects or do you know how to create it? (if so please provide siple code example)

A: 

In retrospect, HTTP is not the easiest protocol to parse. If it were designed from scratch today, it would be very different.

First off, use ASP.NET if possible. If you can't use ASP.NET, then take a look at the HttpListener class.

Stephen Cleary