Method | Description | |
---|---|---|
GetRequestCallback ( IAsyncResult asyncResult ) : void |
This method receives requests from other peers and maps the URI namespace or resource name to an actual namespace handler. If one exists then the namespace handler is invoked to process the request. If not some default processing is used.
|
|
HandleBadRequest ( Terrarium.Net.HttpApplication state, string message ) : void |
Used to handle a request where the method is supported but insufficient data is available. The primary culprit here is a POST operation with no POST data.
|
|
HandleUnsupportedMethod ( Terrarium.Net.HttpApplication state ) : void |
Handles a method that is not supported by the current namespace implementation. This happens whenever a users requests a namespace using a method that isn't valid. This should only happen if Terrarium's of differing versions connect to one another, or someone hits the peer with a web browser and changes the Method to something other than GET or POST.
|
|
HandleUnsupportedNamespace ( Terrarium.Net.HttpApplication state ) : void |
Handles a namespace that isn't currently bound by this namespace manager. This could happen because of case sensitivity issues, trailing path characters or any other string morph that causes the namespace to not match one that is currently registered. This should only happen through a failed user connection using a web browser and a mistyped path.
|
|
HttpNamespaceManager ( ) : System |
Don't create a new HttpNamespaceManager this way, use the static methods instead.
|
|
ReadCallback ( IAsyncResult asyncResult ) : void |
Callback used for asynchronously reading a request stream. Used in order to process transfers will still accepting new connections.
|
|
RegisterNamespace ( string ns, IHttpNamespaceHandler nsHandler ) : void |
Registers a namespace handler for use with a specific namespace. A namespace is the same as a web URI that you might append to any web server to get at some resource.
|
|
Start ( string hostIP, int port ) : void |
Start listening on the given host IP Address, on the given port.
|
|
Stop ( ) : void |
Shuts down the namespace manager by shutting down the _listener. Cleans up any references to the _listener.
|
|
UnregisterNamespace ( string ns ) : void |
Removes a registered namespace from the list so it can no longer be accessed.
|
Method | Description | |
---|---|---|
OnAfterProcessRequest ( ) : void | ||
OnBeforeProcessRequest ( ) : void |
public GetRequestCallback ( IAsyncResult asyncResult ) : void | ||
asyncResult | IAsyncResult | The Async object for the request. |
return | void |
public HandleBadRequest ( Terrarium.Net.HttpApplication state, string message ) : void | ||
state | Terrarium.Net.HttpApplication | The web application state object for this request. |
message | string | The message to be sent to the client to describe the failure. |
return | void |
public HandleUnsupportedMethod ( Terrarium.Net.HttpApplication state ) : void | ||
state | Terrarium.Net.HttpApplication | The web server state object for the connection. |
return | void |
public HandleUnsupportedNamespace ( Terrarium.Net.HttpApplication state ) : void | ||
state | Terrarium.Net.HttpApplication | The web application state for the current connection. |
return | void |
public ReadCallback ( IAsyncResult asyncResult ) : void | ||
asyncResult | IAsyncResult | The Async object representing the results of the read. |
return | void |
public RegisterNamespace ( string ns, IHttpNamespaceHandler nsHandler ) : void | ||
ns | string | The namespace or path of the resource to be handled. |
nsHandler | IHttpNamespaceHandler | The IHttpNamespaceHandler implementation that will handle the request. |
return | void |
public Start ( string hostIP, int port ) : void | ||
hostIP | string | The host's IP address to bind to. |
port | int | The port to bind on. |
return | void |
public UnregisterNamespace ( string ns ) : void | ||
ns | string | The namespace or path of the resource to be removed. |
return | void |