C# Class UlteriusServer.WebServer.HttpServer

Show file Open project: Ulterius/server Class Usage Examples

Public Properties

Property Type Description
DefaultPath string
GlobalPort int

Public Methods

Method Description
HttpServer ( string path ) : System

Construct server with suitable port.

HttpServer ( string path, int port ) : System

Construct server with given port.

SaveFile ( string fileKey, byte data ) : bool
Setup ( ) : void
Stop ( ) : void

Stop server and dispose all functions.

Private Methods

Method Description
HandleUpload ( HttpListenerContext context ) : void
Initialize ( string path, int port ) : void
Listen ( ) : void
Process ( HttpListenerContext context ) : void

Method Details

HttpServer() public method

Construct server with suitable port.
public HttpServer ( string path ) : System
path string Directory path to serve.
return System

HttpServer() public method

Construct server with given port.
public HttpServer ( string path, int port ) : System
path string Directory path to serve.
port int Port of the server.
return System

SaveFile() public method

public SaveFile ( string fileKey, byte data ) : bool
fileKey string
data byte
return bool

Setup() public static method

public static Setup ( ) : void
return void

Stop() public method

Stop server and dispose all functions.
public Stop ( ) : void
return void

Property Details

DefaultPath public static property

public static string DefaultPath
return string

GlobalPort public static property

public static int GlobalPort
return int