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
Afficher le fichier Open project: jgauffin/Griffin.Framework Class Usage Examples

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

Méthode Description
OnDecoderFailure ( ITcpChannel channel, Exception error ) : void

Method Details

HttpListener() public méthode

Initializes a new instance of the HttpListener class.
public HttpListener ( ) : System
Résultat System

HttpListener() public méthode

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

OnClientConnected() protected méthode

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.
Résultat ClientConnectedEventArgs

OnMessage() protected méthode

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 ).
Résultat void

Start() public méthode

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.
Résultat void