• λ我爱Aspx >> Asp.Net >> 用浏览器来接收C# 的程序返回的时间cool!
  • 用浏览器来接收C# 的程序返回的时间cool!

  • :未知  Դ:internet  :2007-5-20 16:44:09  ؼ:c#
  • this.port = port;

    }

    public void listen() {

    Socket listener = new Socket(0, SocketType.SockStream, ProtocolType.ProtTCP);

    IPAddress ipaddress = new IPAddress("169.254.0.244");

    IPEndPoint endpoint = new IPEndPoint(ipaddress, port);

    listener.Bind(endpoint);

    listener.Blocking = true;

    listener.Listen(-1);

    Console.WriteLine("Press Ctrl+c to Quit...");

    while(true) {

    Socket s = listener.Accept();

    HttpProcessor processor = new HttpProcessor(s);

    Thread thread = new Thread(new ThreadStart(processor.process));

    thread.Start();

    }

    }

    public static int Main(String[] args) {

    HttpServer httpServer;

    if(args.GetLength(0) > 0) {

    httpServer = new HttpServer(args[0].ToUInt16());

    } else {

    httpServer = new HttpServer();

    }

    Thread thread = new Thread(new ThreadStart(httpServer.listen));

    thread.Start();

    return 0;

    }

    }

    Ҷƪл˵?
  • һƪ用Asp.net实现简单的文字水印
    һƪ使用C# 编写扩展存储过程