C# Class Cassini.Server

12/29/09 sky: changed visibility to public 12/29/09 sky: modified CreateSocketBindAndListen: added socket option ReuseAddress to prevent false port conflicts with freshly released ports in TIME_WAIT state. In a testing scenario we may be creating and disposing many servers in rapid succession. Default socket behaviour will send the closed socket into the TIME_WAIT state, a sort of cooldown period, making it unavaible. By setting ReuseAddress we are telling winsock to accept the binding event if the socket is in TIME_WAIT. 12/29/09 sky: modified Start: replaced hard coded reference to loopback with instance field _ipAddress and removed the try/catch implicit rollover to ipv6. 12/29/09 sky: modified RootUrl: added support for hostname and arbitrary IP address 01/01/10 sky: added support for relative paths to constructor
Inheritance: System.MarshalByRefObject
Afficher le fichier Open project: gnoso/Chill Class Usage Examples

Méthodes publiques

Méthode Description
HostStopped ( ) : void

InitializeLifetimeService ( ) : object

OnRequestEnd ( Connection conn, CassiniDev.RequestInfo info ) : void

Called at the end of request processing to disconnect the remoting proxy for Connection object and allow GC to pick it up. 01/06/10 sky: modified signature to enable instrumentation

Server ( int port, string virtualPath, string physicalPath ) : System

Start ( ) : void

Stop ( ) : void

Private Methods

Méthode Description
CreateSocketBindAndListen ( AddressFamily family, IPAddress address, int port ) : Socket

Socket listening

CreateWorkerAppDomainWithHost ( string virtualPath, string physicalPath, Type hostType ) : object
GetHost ( ) : Host

Method Details

HostStopped() public méthode

public HostStopped ( ) : void
Résultat void

InitializeLifetimeService() public méthode

public InitializeLifetimeService ( ) : object
Résultat object

OnRequestEnd() public méthode

Called at the end of request processing to disconnect the remoting proxy for Connection object and allow GC to pick it up. 01/06/10 sky: modified signature to enable instrumentation
public OnRequestEnd ( Connection conn, CassiniDev.RequestInfo info ) : void
conn Connection
info CassiniDev.RequestInfo
Résultat void

Server() public méthode

public Server ( int port, string virtualPath, string physicalPath ) : System
port int
virtualPath string
physicalPath string
Résultat System

Start() public méthode

public Start ( ) : void
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void