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
Mostrar archivo Open project: gnoso/Chill Class Usage Examples

Public Methods

Method 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

Method 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 method

public HostStopped ( ) : void
return void

InitializeLifetimeService() public method

public InitializeLifetimeService ( ) : object
return object

OnRequestEnd() public method

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
return void

Server() public method

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

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void