| | |
| | | } |
| | | }); |
| | | contextThread.Start (); |
| | | System.Console.WriteLine ("HttpListener已经启动!"); |
| | | Utlis.WriteLine ("HttpListener已经启动!"); |
| | | } |
| | | } catch (Exception e) { |
| | | System.Console.WriteLine ("HttpListener启动失败!\r\n" + e.Message); |
| | | Utlis.WriteLine ("HttpListener启动失败!\r\n" + e.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | listener = null; |
| | | } |
| | | } catch { } |
| | | System.Console.WriteLine ("HttpListener已经关闭!"); |
| | | Utlis.WriteLine ("HttpListener已经关闭!"); |
| | | } |
| | | |
| | | private static void manager (System.Net.HttpListenerContext httpListenerContext) |
| | |
| | | //streamWriter.WriteLine(text); |
| | | //streamWriter.Close(); |
| | | |
| | | System.Console.WriteLine ("HttpListener 接收到测试信息!"); |
| | | Utlis.WriteLine ("HttpListener 接收到测试信息!"); |
| | | |
| | | } |
| | | |