Skip to content

talesfromtherift/StreamSocketHttpServer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 1 commit ahead, 2 commits behind sourceclimber:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

StreamSocketHttpServer

A simple HTTP server based on StreamSocketListener.

I used this implementation of an HTTP server for a Xamarin project including Windows 10 (Universal Platform) and Windows Phone 8.1, because the HttpListener class is not available for this platforms. ##Usage Create a derived class from the HttpServer class and override the HandleRequest method.

class MusicServer : HttpServer
{
  /// <summary>
  /// This method handles each HTTP request to the server.
  /// </summary>
  public override async Task HandleRequest(HttpRequest request, HttpResponse response)
  {
    //Create the response depeding ond the request
  }
}

###Credits For the HTTP request parser and the the response object is used the code from Sample HTTP Server Skeleton in C# from CodeProject.com.

About

A simple HTTP server based on StreamSocketListener

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%