using System;
using System.Net;
using System.IO;
using System.Threading;
using System.Text;
using MySql.Data.MySqlClient;
using System.Collections.Generic;
public class TheServer
{
private string result = "";
private MySqlConnection conn;
private HttpListener _listener;
private Thread _threadWatchPort;
private DataBaceTool Tool = new DataBaceTool();
// private List<Dictionary<string, object>> Listinfo;
static void Main(String[] args)
{
if (!HttpListener.IsSupported)
{
Console.Write("系统不支持HttpListener");
}
else
{
Console.Write("系统支持HttpListener");
}
TheServer Start = new TheServer();
Start.StartListening();//开始监听
Start.Tool.OpenDataBace();//打开数据库
// Start.QueryAllData("AirportManager");
}//检测系统支持不支持
public void StartListening()
{
Console.Write("开始监听" );
使用HttpListener 实现简单的web服务器
最新推荐文章于 2025-05-31 22:00:00 发布