Quantcast
Viewing latest article 17
Browse Latest Browse All 20

UPDATED WIKI: HttpQuickStart

Description

The HTTP (Hyper Text Transfer Protocol) Server as the name implies serves files using the HTTP protocol.

The server has three main configuration options:
  • The types of listeners (Nonsecure TCP or Secure TCP)
  • The backing file system
  • The security provider.

Samples

This is the minimal code needed to create a HTTP server:


In this case a server that listens on port 80, servers up data from c:\temp, and allows anyone to access it
HttpServer server = new HttpServer();
server.Listeners.Add(new NonsecureTcpListener(HttpServer.DEFAULT_NONSECURE_PORT));
server.FileSystem = new DiskFileSystem("c:\\temp");
server.SecurityProvider = new OpenSecurityProvider();
server.Start();
// ...
server.Stop();

Viewing latest article 17
Browse Latest Browse All 20

Trending Articles