Sockets vs HttpListener

I am working on creating a proxy server that listens on a specific port for incoming connections. These are usually Http (GET / POST) requests. You cannot select HttpListener or Sockets. I will modify the HttpRequests in the proxy server and then pass it to the final destination.

When you prefer HttpListener over sockets. What are the benefits of each?

+5
source share
1 answer
  • Benefits of HttpListener
    • Allows port sharing by other processes using http.sys (including those using HttpListener or IIS if the prefixes are unique)
    • Http.sys /; , TcpListener
    • HttpListener HTTP HTTP
    • , ASP.Net, , cookie ..
  • HttpListener
    • MAJOR. Localhost, HTTP, TcpListener Mono HttpListener Windows. (, 5 ) POST , . ( , ). , .
    • , TCP; http.sys ( , , )
    • header/cookie ; , , cookie, , HttpListener Set-Cookie , IE, Chrome ( cookie Set- cookie, .
  • TcpListener
    • HttpListener, / .
    • - (, check auth), , , ; ( ).
  • TcpListener HttpListener
    • HTTP-
    • , HTTP- .
  • 100%
    • , , TcpListener
  • 100%
    • , / , - , , . , .
    • , , HttpListener, , . HttpListener - .

2016 : HttpListener . HttpListener - , . , HttpListener http.sys, , , -, . , 100 # 35 , POSTing 100 HttpListener - 350 (, 10 ). Mono HttpListener 250 . TcpListener Socket 180 . CircularBuffer MemoryMappedFiles 55 . , HttpListener . . , . Stern , Send/Write , - ( , , , , , , ).

HttpListener vs Mono HttpListener : https://www.linkedin.com/pulse/http-inefficiency-dominika-blach

+13

All Articles