C# Class Dmap.WebServer

Afficher le fichier Open project: gburt/dmap-sharp Class Usage Examples

Méthodes publiques

Méthode Description
AddCredential ( NetworkCredential cred ) : void
RemoveCredential ( NetworkCredential cred ) : void
Start ( ) : void
Stop ( ) : void
WebServer ( UInt16 port, WebHandler handler ) : System
WriteAccessDenied ( Socket client ) : void
WriteOk ( Socket client ) : void
WriteResponse ( Socket client, ContentNode node ) : void
WriteResponse ( Socket client, HttpStatusCode code, byte body ) : void
WriteResponse ( Socket client, HttpStatusCode code, string body ) : void
WriteResponseFile ( Socket client, string file, long offset ) : void
WriteResponseStream ( Socket client, Stream response, long len ) : void
WriteResponseStream ( Socket client, Stream response, long len, long offset ) : void

Private Methods

Méthode Description
HandleConnection ( object o ) : void
HandleRequest ( Socket client ) : bool
IsValidAuth ( string user, string pass ) : bool
ServerLoop ( ) : void

Method Details

AddCredential() public méthode

public AddCredential ( NetworkCredential cred ) : void
cred System.Net.NetworkCredential
Résultat void

RemoveCredential() public méthode

public RemoveCredential ( NetworkCredential cred ) : void
cred System.Net.NetworkCredential
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void

WebServer() public méthode

public WebServer ( UInt16 port, WebHandler handler ) : System
port System.UInt16
handler WebHandler
Résultat System

WriteAccessDenied() public méthode

public WriteAccessDenied ( Socket client ) : void
client Socket
Résultat void

WriteOk() public méthode

public WriteOk ( Socket client ) : void
client Socket
Résultat void

WriteResponse() public méthode

public WriteResponse ( Socket client, ContentNode node ) : void
client Socket
node ContentNode
Résultat void

WriteResponse() public méthode

public WriteResponse ( Socket client, HttpStatusCode code, byte body ) : void
client Socket
code HttpStatusCode
body byte
Résultat void

WriteResponse() public méthode

public WriteResponse ( Socket client, HttpStatusCode code, string body ) : void
client Socket
code HttpStatusCode
body string
Résultat void

WriteResponseFile() public méthode

public WriteResponseFile ( Socket client, string file, long offset ) : void
client Socket
file string
offset long
Résultat void

WriteResponseStream() public méthode

public WriteResponseStream ( Socket client, Stream response, long len ) : void
client Socket
response Stream
len long
Résultat void

WriteResponseStream() public méthode

public WriteResponseStream ( Socket client, Stream response, long len, long offset ) : void
client Socket
response Stream
len long
offset long
Résultat void