开发者

Can I build local http server? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current f开发者_C百科orm. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago.

I need to build a local fake http server. It will listen all my http request and will decide which packet will be dropped or forward or delayed. Can I do that ? If I can how can I do it ?


Can I do that ?

Yes

If I can how can I do it ?

First, make a socket server:

http://www.switchonthecode.com/tutorials/csharp-tutorial-simple-threaded-tcp-server

Next, parse HTTP and respond to it (linked in HTTP/1.0 for simplicity):

http://www.ietf.org/rfc/rfc1945.txt

As for "dropped or delayed", a "web server" does not operate at a packet level, you will have to clarify what you need it to do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜