You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`MaxLib.WebServer` is a full web server written in C#. To use this webserver you only need to add the .NuGet package to your project, instantiate the server in your code and thats it. No special configuration files or multiple processes.
13
+
`MaxLib.WebServer` is a full web server written in C#. To use this webserver you only need to add
14
+
the .NuGet package to your project, instantiate the server in your code and thats it. No special
15
+
configuration files or multiple processes.
10
16
11
-
This web server is build modular. Any modules can be replaced by you and you decide what the server is cabable of. The server can fully configured (including exchanging the modules) during runtime - no need to restart everything.
17
+
This web server is build modular. Any modules can be replaced by you and you decide what the server
18
+
is capable of. The server can fully configured (including exchanging the modules) during runtime -
19
+
no need to restart everything.
12
20
13
21
Some of the current features of the web server are:
14
22
- HTTP web server (of course, that's the purpose of the project)
15
23
- HTTPS web server with SSL certificates
16
-
- HTTP and HTTPS web server on the same port. The server detects automaticly what the user intends to use.
24
+
- HTTP and HTTPS web server on the same port. The server detects automatically what the user intends
25
+
to use.
17
26
- Asynchronous handling of requests. Every part of the pipeline works with awaitable Tasks.
18
27
- REST Api builder. You can directly bind your methods to the handlers.
19
-
- Chunked transport. The server understands chunked datastreams and can produce these.
20
-
- Lazy handling of requests. The server allows you to produce the content while you are sending the response. No need to wait.
28
+
- Chunked transport. The server understands chunked data streams and can produce these.
29
+
- Lazy handling of requests. The server allows you to produce the content while you are sending the
30
+
response. No need to wait.
21
31
- Work with components that belongs to another AppDomain with Marshaling.
22
32
- Deliver contents from your local drive (e.g. HDD)
23
33
- Session keeping. You can identify the user later.
@@ -41,132 +51,88 @@ Write somewhere in your code (e.g.) in your Main method of your programm the fol
41
51
42
52
```csharp
43
53
usingMaxLib.WebServer;
44
-
usingMaxLib.WebServer.Services;
54
+
usingMaxLib.WebServer.Builder; // this using is used later in this tutorial
45
55
46
-
// in your code
47
-
voidSetupServer()
48
-
{
49
-
// this expects that server is a variable that you have defined in your class
50
-
server=newServer(newWebServerSettings(
51
-
8000, // this will run the server on port 8000
52
-
5000// set the timout to 5 seconds.
53
-
));
54
-
55
-
// now add some services. You can use your own implementations but here we
56
-
// will add a basic set of services from MaxLib.WebServer.Services.
57
-
58
-
// this will read the request from the network stream
59
-
server.AddWebService(newHttpHeaderParser());
60
-
// this will read the header information and prepare them for later usage.
61
-
server.AddWebService(newHttpHeaderPostParser());
62
-
// this will take care of HTTP OPTIONS or HEAD requests
After that you can run your programm and open the page [http://localhost:8000/hello](http://localhost:8000/hello). You will see your hello world message.
110
+
After that you can run your programm and open the page
111
+
[http://localhost:8000/hello](http://localhost:8000/hello). You will see your hello world message.
112
+
113
+
> More information about the new builder system can be found [here](https://github.com/Garados007/MaxLib.WebServer/wiki/Builder-System)
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
122
+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process
123
+
for submitting pull requests to us.
160
124
161
125
## Versioning
162
126
163
-
We use [SemVer](semver.org) for versioning. For the versions available, see the [tags on this repository](https://github.com/Garados007/MaxLib.WebServer/tags).
127
+
We use [SemVer](semver.org) for versioning. For the versions available, see the [tags on this
This project was a free time project of mine and I have done it because why not. The source
184
-
code was a long time a part of [MaxLib](https://github.com/Garados007/MaxLib) (a collection
185
-
of other fun projects and code) but got its own repository for better maintenance.
150
+
This project was a free time project of mine and I have done it because why not. The source code was
151
+
a long time a part of [MaxLib](https://github.com/Garados007/MaxLib) (a collection of other fun
152
+
projects and code) but got its own repository for better maintenance.
153
+
154
+
Some of the documentation inside the code is still in German and other things needs to be optimized.
186
155
187
-
Some of the documentation inside the code is still in German and other things needs to be
188
-
optimized.
156
+
I have used this for some projects with my friends. It can handle some TB of traffic over a long
157
+
period without any problems or crashes. I am a little proud of this.
189
158
190
-
I have used this for some projects with my friends. It can handle some TB of traffic over a long period without any problems or crashes. I am a little proud of this.
159
+
I will further maintain and extend this library if I have new cool features in mind (this was the
160
+
case for the full WebSocket support and easy Builder System).
0 commit comments