C# Класс Universe.Framework.Servers.HttpServer.BaseHttpServer

Наследование: IHttpServer, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
HTTPDRunning bool
OnOverrideRequest Action

Защищенные свойства (Protected)

Свойство Тип Описание
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

Свойство Тип Описание
GetHTTP404 string
GetHTTP500 string
GetHandlerKey string
HandleXmlRpcRequests byte[]
OnRequest void
TryGetPollServiceHTTPHandler bool
TryGetStreamHandler bool
getDefaultHTTP404 string
getDefaultHTTP500 string

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddPollServiceHTTPHandler() публичный Метод

public AddPollServiceHTTPHandler ( string methodName, PollServiceEventArgs args ) : bool
methodName string
args PollServiceEventArgs
Результат bool

AddStreamHandler() публичный Метод

Add a stream handler to the http server. If the handler already exists, then nothing happens.
public AddStreamHandler ( IStreamedRequestHandler handler ) : void
handler IStreamedRequestHandler
Результат void

AddXmlRPCHandler() публичный Метод

public AddXmlRPCHandler ( string method, XmlRpcMethod handler ) : bool
method string
handler XmlRpcMethod
Результат bool

BaseHttpServer() публичный Метод

public BaseHttpServer ( uint port, string hostName, bool isSecure, uint threadCount ) : System
port uint
hostName string
isSecure bool
threadCount uint
Результат System

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GetHTML404() публичный Метод

public GetHTML404 ( OSHttpResponse response ) : byte[]
response Universe.Framework.Servers.HttpServer.Implementation.OSHttpResponse
Результат byte[]

GetHTML500() публичный Метод

public GetHTML500 ( HttpListenerResponse response ) : byte[]
response System.Net.HttpListenerResponse
Результат byte[]

GetXmlRPCHandler() публичный Метод

public GetXmlRPCHandler ( string method ) : XmlRpcMethod
method string
Результат XmlRpcMethod

HandleRequest() публичный Метод

This methods is the start of incoming HTTP request handling.
public HandleRequest ( HttpListenerContext context ) : void
context System.Net.HttpListenerContext
Результат void

RemovePollServiceHTTPHandler() публичный Метод

public RemovePollServiceHTTPHandler ( string httpMethod, string path ) : void
httpMethod string
path string
Результат void

RemoveStreamHandler() публичный Метод

public RemoveStreamHandler ( string httpMethod, string path ) : void
httpMethod string
path string
Результат void

RemoveXmlRPCHandler() публичный Метод

public RemoveXmlRPCHandler ( string method ) : void
method string
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

Stop() публичный Метод

public Stop ( ) : void
Результат void

Описание свойств

HTTPDRunning публичное свойство

public bool HTTPDRunning
Результат bool

NotSocketErrors защищенное свойство

protected int NotSocketErrors
Результат int

OnOverrideRequest публичное свойство

public Action OnOverrideRequest
Результат Action

m_hostName защищенное свойство

protected string m_hostName
Результат string

m_internalServer защищенное свойство

protected HttpListenerManager,Universe.Framework.Servers.HttpServer m_internalServer
Результат HttpListenerManager

m_isSecure защищенное свойство

protected bool m_isSecure
Результат bool

m_listenIPAddress защищенное свойство

protected IPAddress,System.Net m_listenIPAddress
Результат System.Net.IPAddress

m_pollHandlers защищенное свойство

protected Dictionary m_pollHandlers
Результат PollServiceEventArgs>.Dictionary

m_port защищенное свойство

protected uint m_port
Результат uint

m_rpcHandlers защищенное свойство

protected Dictionary m_rpcHandlers
Результат XmlRpcMethod>.Dictionary

m_streamHandlers защищенное свойство

protected Dictionary m_streamHandlers
Результат IStreamedRequestHandler>.Dictionary