C# Class Universe.Framework.Servers.HttpServer.BaseHttpServer

Inheritance: IHttpServer, IDisposable
Afficher le fichier Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Méthodes publiques

Свойство Type Description
HTTPDRunning bool
OnOverrideRequest Action

Protected Properties

Свойство Type Description
NotSocketErrors int
m_hostName string
m_internalServer HttpListenerManager
m_isSecure bool
m_listenIPAddress System.Net.IPAddress
m_pollHandlers PollServiceEventArgs>.Dictionary
m_port uint
m_rpcHandlers XmlRpcMethod>.Dictionary
m_streamHandlers IStreamedRequestHandler>.Dictionary

Private Properties

Свойство Type Description
GetHTTP404 string
GetHTTP500 string
GetHandlerKey string
HandleXmlRpcRequests byte[]
OnRequest void
TryGetPollServiceHTTPHandler bool
TryGetStreamHandler bool
getDefaultHTTP404 string
getDefaultHTTP500 string

Méthodes publiques

Méthode Description
AddPollServiceHTTPHandler ( string methodName, PollServiceEventArgs args ) : bool
AddStreamHandler ( IStreamedRequestHandler handler ) : void

Add a stream handler to the http server. If the handler already exists, then nothing happens.

AddXmlRPCHandler ( string method, XmlRpcMethod handler ) : bool
BaseHttpServer ( uint port, string hostName, bool isSecure, uint threadCount ) : System
Dispose ( ) : void
GetHTML404 ( OSHttpResponse response ) : byte[]
GetHTML500 ( HttpListenerResponse response ) : byte[]
GetXmlRPCHandler ( string method ) : XmlRpcMethod
HandleRequest ( HttpListenerContext context ) : void

This methods is the start of incoming HTTP request handling.

RemovePollServiceHTTPHandler ( string httpMethod, string path ) : void
RemoveStreamHandler ( string httpMethod, string path ) : void
RemoveXmlRPCHandler ( string method ) : void
Start ( ) : void
Stop ( ) : void

Private Methods

Méthode Description
GetHTTP404 ( ) : string
GetHTTP500 ( ) : string
GetHandlerKey ( string httpMethod, string path ) : string
HandleXmlRpcRequests ( OSHttpRequest request, OSHttpResponse response ) : byte[]

Try all the registered xmlrpc handlers when an xmlrpc request is received. Sends back an XMLRPC unknown request response if no handler is registered for the requested method.

OnRequest ( HttpListenerContext context ) : void
TryGetPollServiceHTTPHandler ( string handlerKey, PollServiceEventArgs &oServiceEventArgs ) : bool
TryGetStreamHandler ( string handlerKey, IStreamedRequestHandler &streamHandler ) : bool
getDefaultHTTP404 ( ) : string
getDefaultHTTP500 ( ) : string

Method Details

AddPollServiceHTTPHandler() public méthode

public AddPollServiceHTTPHandler ( string methodName, PollServiceEventArgs args ) : bool
methodName string
args PollServiceEventArgs
Résultat bool

AddStreamHandler() public méthode

Add a stream handler to the http server. If the handler already exists, then nothing happens.
public AddStreamHandler ( IStreamedRequestHandler handler ) : void
handler IStreamedRequestHandler
Résultat void

AddXmlRPCHandler() public méthode

public AddXmlRPCHandler ( string method, XmlRpcMethod handler ) : bool
method string
handler XmlRpcMethod
Résultat bool

BaseHttpServer() public méthode

public BaseHttpServer ( uint port, string hostName, bool isSecure, uint threadCount ) : System
port uint
hostName string
isSecure bool
threadCount uint
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

GetHTML404() public méthode

public GetHTML404 ( OSHttpResponse response ) : byte[]
response Universe.Framework.Servers.HttpServer.Implementation.OSHttpResponse
Résultat byte[]

GetHTML500() public méthode

public GetHTML500 ( HttpListenerResponse response ) : byte[]
response System.Net.HttpListenerResponse
Résultat byte[]

GetXmlRPCHandler() public méthode

public GetXmlRPCHandler ( string method ) : XmlRpcMethod
method string
Résultat XmlRpcMethod

HandleRequest() public méthode

This methods is the start of incoming HTTP request handling.
public HandleRequest ( HttpListenerContext context ) : void
context System.Net.HttpListenerContext
Résultat void

RemovePollServiceHTTPHandler() public méthode

public RemovePollServiceHTTPHandler ( string httpMethod, string path ) : void
httpMethod string
path string
Résultat void

RemoveStreamHandler() public méthode

public RemoveStreamHandler ( string httpMethod, string path ) : void
httpMethod string
path string
Résultat void

RemoveXmlRPCHandler() public méthode

public RemoveXmlRPCHandler ( string method ) : void
method string
Résultat void

Start() public méthode

public Start ( ) : void
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void

Property Details

HTTPDRunning public_oe property

public bool HTTPDRunning
Résultat bool

NotSocketErrors protected_oe property

protected int NotSocketErrors
Résultat int

OnOverrideRequest public_oe property

public Action OnOverrideRequest
Résultat Action

m_hostName protected_oe property

protected string m_hostName
Résultat string

m_internalServer protected_oe property

protected HttpListenerManager,Universe.Framework.Servers.HttpServer m_internalServer
Résultat HttpListenerManager

m_isSecure protected_oe property

protected bool m_isSecure
Résultat bool

m_listenIPAddress protected_oe property

protected IPAddress,System.Net m_listenIPAddress
Résultat System.Net.IPAddress

m_pollHandlers protected_oe property

protected Dictionary m_pollHandlers
Résultat PollServiceEventArgs>.Dictionary

m_port protected_oe property

protected uint m_port
Résultat uint

m_rpcHandlers protected_oe property

protected Dictionary m_rpcHandlers
Résultat XmlRpcMethod>.Dictionary

m_streamHandlers protected_oe property

protected Dictionary m_streamHandlers
Résultat IStreamedRequestHandler>.Dictionary