C# 클래스 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
상속: System.MarshalByRefObject
파일 보기 프로젝트 열기: gnoso/Chill 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
CreateSocketBindAndListen ( AddressFamily family, IPAddress address, int port ) : Socket

Socket listening

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

메소드 상세

HostStopped() 공개 메소드

public HostStopped ( ) : void
리턴 void

InitializeLifetimeService() 공개 메소드

public InitializeLifetimeService ( ) : object
리턴 object

OnRequestEnd() 공개 메소드

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
리턴 void

Server() 공개 메소드

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

Start() 공개 메소드

public Start ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void