C# Class Griffin.Net.Protocols.Http.HttpListener

HTTP listener

Will produce HttpRequest unless you change the BodyDecoder property, which will make the listener produce HttpRequest instead.

Inheritance: ChannelTcpListener
Mostra file Open project: jgauffin/Griffin.Framework Class Usage Examples

Public Methods

Method Description
HttpListener ( ) : System

Initializes a new instance of the HttpListener class.

HttpListener ( ChannelTcpListenerConfiguration configuration ) : System

Initializes a new instance of the HttpListener class.

Start ( IPAddress address, int port ) : void

Start this listener

Protected Methods

Method Description
OnClientConnected ( ITcpChannel channel ) : ClientConnectedEventArgs

A client has connected (nothing has been sent or received yet)

OnMessage ( ITcpChannel source, object msg ) : void

Receive a new message from the specified client

Private Methods

Method Description
OnDecoderFailure ( ITcpChannel channel, Exception error ) : void

Method Details

HttpListener() public method

Initializes a new instance of the HttpListener class.
public HttpListener ( ) : System
return System

HttpListener() public method

Initializes a new instance of the HttpListener class.
public HttpListener ( ChannelTcpListenerConfiguration configuration ) : System
configuration ChannelTcpListenerConfiguration
return System

OnClientConnected() protected method

A client has connected (nothing has been sent or received yet)
protected OnClientConnected ( ITcpChannel channel ) : ClientConnectedEventArgs
channel ITcpChannel Channel which we created for the remote socket.
return ClientConnectedEventArgs

OnMessage() protected method

Receive a new message from the specified client
protected OnMessage ( ITcpChannel source, object msg ) : void
source ITcpChannel Channel for the client
msg object Message (as decoded by the specified ).
return void

Start() public method

Start this listener
public Start ( IPAddress address, int port ) : void
address System.Net.IPAddress Address to accept connections on
port int Port to use. Set to 0 to let the OS decide which port to use.
return void