开发者

Can I build local http server? [closed]

开发者 https://www.devze.com 2023-01-24 06:37 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current f开发者_C百科orm. Fo
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

精彩评论

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