byr0n3 / Xenia

A simple, minimalistic HTTP server written in C#.
1 stars 0 forks source link

Parallel requests #20

Open byr0n3 opened 10 months ago

byr0n3 commented 10 months ago

Support parallel requests, maybe by multi threading? Look into this some more.

byr0n3 commented 10 months ago

Possible idea: add a new function to Server.cs: void Start(), which binds the socket endpoint and starts listening for connections. Then start multiple threads that executes the Listen function on the server. Not sure how performant this is and if it'll even work.

byr0n3 commented 10 months ago

Another idea would be to accept the client and then use ThreadPool.QueueUserWorkItem() to invoke a function to process the request on a different thread. This seems more legit and beneficial but probably will have more consequences.