Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/space-wizards/spacewizards.httplistener
Managed, maintained, updated, and unprofessionally butchered fork of System.Net.HttpListener
https://github.com/space-wizards/spacewizards.httplistener
csharp dotnet http http-server httplistener
Last synced: about 2 months ago
JSON representation
Managed, maintained, updated, and unprofessionally butchered fork of System.Net.HttpListener
- Host: GitHub
- URL: https://github.com/space-wizards/spacewizards.httplistener
- Owner: space-wizards
- License: mit
- Created: 2020-12-20T22:06:17.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-12T16:30:33.000Z (5 months ago)
- Last Synced: 2024-10-30T05:41:58.489Z (2 months ago)
- Topics: csharp, dotnet, http, http-server, httplistener
- Language: C#
- Homepage:
- Size: 330 KB
- Stars: 16
- Watchers: 5
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
# SpaceWizards.HttpListener [![Nuget](https://img.shields.io/nuget/v/SpaceWizards.HttpListener)](https://www.nuget.org/packages/SpaceWizards.HttpListener)
A relatively lightweight and embeddable HTTP server for .NET. `SpaceWizards.HttpListener` is a maintained, updated, and unprofessionally butchered fork of the managed implementation of `System.Net.HttpListener` straight out of https://github.com/dotnet/runtime. This means:
* Will always use the fully managed implementation of `HttpListener`. On Windows, `System.Net.HttpListener` uses a different backend than Mac/Linux, namely the original `http.sys` backend. This functions very differently in behavior and bugs, which is unsuitable for cross-platform apps. Furthermore, binding something like `0.0.0.0:1212` with it requires admin even if a plain TCP socket would be fine otherwise.
* Bugfixes over the .NET Runtime implementation, which is basically unmaintained short of being kept around for compatibility. The original Mono implementation Mac/Linux `HttpListener` uses is quite buggy.
* You may expect some more modern innovations and maybe breaking changes. We're primarily maintaining this for [RobustToolbox](https://github.com/space-wizards/RobustToolbox) so there you go.## Release Notes
See [RELEASE-NOTES.md](./RELEASE-NOTES.md).
## Examples
Literally any of the tutorials for `System.Net.HttpListener` will probably do. There are also our usages in Robust:
* [Simple HTTP server for game server control and querying APIs](https://github.com/space-wizards/RobustToolbox/tree/4d707c86cbfa5814cfa8b406dfd315fd1ad9948b/Robust.Server/ServerStatus)
* [Alternative HTTP server implementation for prometheus-net](https://github.com/space-wizards/RobustToolbox/blob/4d707c86cbfa5814cfa8b406dfd315fd1ad9948b/Robust.Server/DataMetrics/MetricsManager.MetricsServer.cs)