private static string _virtroot; //应用程序的虚拟目录
private cassini.server _server; // the web server 源代码中的注释
cassiniform的构造函数也没有什么特别,我们看到有一个关键的start(),从名字我们大致可以猜到是web server启动过程。仔细来看看:
private void start()
{
_apppath = appdirtextbox.text;
if (_apppath.length == 0 || !directory.exists(_apppath)) {
showerror("invalid application directory");
appdirtextbox.selectall();
appdirtextbox.focus();
return;
}
_portstring = porttextbox.text;
int portnumber = -1;
try {
portnumber = int32.parse(_portstring);