();
+ static void Main(string[] args)
+ {
+
+ tcpListener = new TcpListener(IPAddress.Parse("127.0.0.1"), 9999);
+ tcpListener.Start(10);
+ Console.WriteLine("启动服务(IP:127.0.0.1 端口:9999),等待客户端连接!");
+ Task.Run(() => { Accept(); });
+
+ while (true)
+ {
+ //群发
+ var msg = Console.ReadLine();
+ foreach (var item in networkStreams)
+ {
+ item.Write(Encoding.UTF8.GetBytes(msg));
+ }
+ }
+ }
+
+ ///
+ /// 等待客户端的连接
+ ///
+ static void Accept()
+ {
+ while (true)
+ {
+ TcpClient tcpClient = tcpListener.AcceptTcpClient();
+ NetworkStream networkStream = tcpClient.GetStream();
+ Console.WriteLine($"{tcpClient.Client.RemoteEndPoint}上线");
+ networkStreams.Add(networkStream);
+ Task.Run(() => { Read(networkStream, tcpClient); });
+ }
+ }
+
+ ///
+ /// 接收消息
+ ///
+ ///
+ static void Read(NetworkStream networkStream, TcpClient tcpClient)
+ {
+ while (true)
+ {
+ try
+ {
+ byte[] buffer = new byte[1024 * 1024];
+ //BinaryReader binaryReader = new BinaryReader(networkStream);
+ var readLen = networkStream.Read(buffer, 0, buffer.Length);
+ if (readLen == 0)
+ {
+ Console.WriteLine($"{tcpClient.Client.RemoteEndPoint}下线");
+ networkStreams.Remove(networkStream);
+ networkStream.Close();
+ tcpClient.Close();
+ return;
+ }
+ Console.WriteLine(tcpClient.Client.RemoteEndPoint + ":" + Encoding.UTF8.GetString(buffer, 0, readLen));
+ }
+ catch (Exception) { }
+ }
+ }
+ }
+}
diff --git "a/Socket\347\274\226\347\250\213/1Socket/TcpServerConsole/Tcp\346\234\215\345\212\241\347\253\257.csproj" "b/Socket\347\274\226\347\250\213/1Socket/TcpServerConsole/Tcp\346\234\215\345\212\241\347\253\257.csproj"
new file mode 100644
index 0000000..958d2f1
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/1Socket/TcpServerConsole/Tcp\346\234\215\345\212\241\347\253\257.csproj"
@@ -0,0 +1,8 @@
+
+
+
+ Exe
+ netcoreapp3.0
+
+
+
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Index.html" "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Index.html"
new file mode 100644
index 0000000..c16293d
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Index.html"
@@ -0,0 +1,15 @@
+
+
+
+
+
+ 模拟服务器响应浏览器
+
+
+ 你好,农码一生
+ 你也可以写个web服务器,你看我不就是个Web服务器吗。
+
+
+
\ No newline at end of file
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Index2.html" "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Index2.html"
new file mode 100644
index 0000000..ecf22e6
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Index2.html"
@@ -0,0 +1,15 @@
+
+
+
+
+
+ 模拟服务器响应浏览器2
+
+
+ 你好,农码一生
+ 我是第二个页面了
+
+
+
\ No newline at end of file
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Program.cs" "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Program.cs"
new file mode 100644
index 0000000..adfcaab
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/Program.cs"
@@ -0,0 +1,91 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HTTPServer
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ //1 创建Socket对象
+ Socket socketServer = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+
+ //2 绑定ip和端口
+ IPAddress ip = IPAddress.Parse("127.0.0.1");
+ IPEndPoint ipEndPoint = new IPEndPoint(ip, 80);
+ socketServer.Bind(ipEndPoint);
+
+ //3、开启侦听(等待客户机发出的连接),并设置最大客户端连接数为10
+ socketServer.Listen(10);
+
+ Console.WriteLine("服务已启动...");
+ Console.WriteLine();
+ Task.Run(() => { Accept(socketServer); });
+
+ Console.ReadKey();
+ }
+
+ //4 阻塞等待客户端连接
+ private static void Accept(Socket socketServer)
+ {
+ while (true)
+ {
+ //阻塞等待客户端连接
+ Socket newSocket = socketServer.Accept();
+ Task.Run(() => { Receive(newSocket); });
+ }
+ }
+
+ //5 读取客户端发送过来的报文
+ private static void Receive(Socket newSocket)
+ {
+ byte[] data = new byte[1024 * 1024];
+ while (newSocket.Connected)
+ {
+ //读取客户端发送过来的数据
+ int readLeng = newSocket.Receive(data, 0, data.Length, SocketFlags.None);
+ if (readLeng == 0)//客户端断开连接
+ {
+ //停止会话(禁用Socket上的发送和接收,该方法允许Socket对象一直等待,直到将内部缓冲区的数据发送完为止)
+ newSocket.Shutdown(SocketShutdown.Both);
+ //关闭连接
+ newSocket.Close();
+ return;
+ }
+
+ //读取客户端发来的请求报文
+ var requst = Encoding.UTF8.GetString(data, 0, readLeng);
+ Console.WriteLine("收到请求报文:");
+ Console.WriteLine(requst);
+
+ //解析请求报文的请求路径(可以解析请求路径、请求文件、文件类型)
+ var requstFile = requst.Split("\r\n")[0].Split(" ")[1];
+
+ //回复客户端响应报文
+ Send(newSocket, requstFile);
+ }
+ }
+
+ //6 回复客户端响应报文
+ private static void Send(Socket newSocket, string requstFile)
+ {
+ //这里如果请求的根目录,默认显示Index.html
+ if (requstFile == "/" ) requstFile = "/Index.html";
+
+ var msg = File.ReadAllText(Directory.GetCurrentDirectory() + requstFile);
+ //把消息内容转成字节数组后发送
+ newSocket.Send(Encoding.UTF8.GetBytes(msg));
+ Console.WriteLine("回复响应报文:");
+ Console.WriteLine(msg);
+ Console.WriteLine();
+
+ //回复响应后马上关闭连接
+ newSocket.Shutdown(SocketShutdown.Both);
+ newSocket.Close();
+ }
+ }
+}
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/favicon.ico" "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/favicon.ico"
new file mode 100644
index 0000000..54aa837
Binary files /dev/null and "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/favicon.ico" differ
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/\346\250\241\346\213\237Web\346\234\215\345\212\241\345\231\250.csproj" "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/\346\250\241\346\213\237Web\346\234\215\345\212\241\345\231\250.csproj"
new file mode 100644
index 0000000..54a0bef
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/HTTPServer/\346\250\241\346\213\237Web\346\234\215\345\212\241\345\231\250.csproj"
@@ -0,0 +1,20 @@
+
+
+
+ Exe
+ netcoreapp3.0
+
+
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+
+
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/App.config" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/App.config"
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/App.config"
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.Designer.cs" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.Designer.cs"
new file mode 100644
index 0000000..2e6ddfc
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.Designer.cs"
@@ -0,0 +1,97 @@
+namespace SimulateHttpGet
+{
+ partial class Form1
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ /// 如果应释放托管资源,为 true;否则为 false。
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows 窗体设计器生成的代码
+
+ ///
+ /// 设计器支持所需的方法 - 不要修改
+ /// 使用代码编辑器修改此方法的内容。
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(635, 34);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 0;
+ this.button1.Text = "请求";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(191, 36);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(412, 21);
+ this.textBox1.TabIndex = 1;
+ this.textBox1.Text = "http://fanyi-pro.baidu.com";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 41);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(173, 12);
+ this.label1.TabIndex = 2;
+ this.label1.Text = "Url地址(http地址非https):";
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(14, 81);
+ this.textBox2.Multiline = true;
+ this.textBox2.Name = "textBox2";
+ this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+ this.textBox2.Size = new System.Drawing.Size(696, 344);
+ this.textBox2.TabIndex = 3;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(736, 450);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.textBox1);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox textBox2;
+ }
+}
+
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.cs" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.cs"
new file mode 100644
index 0000000..bd3c4b7
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.cs"
@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace SimulateHttpGet
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ CheckForIllegalCrossThreadCalls = false;
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ //得到主机信息
+ IPHostEntry ipInfo = Dns.GetHostEntry(new Uri(textBox1.Text).Host);
+ //取得IPAddress[]
+ IPAddress[] ipAddr = ipInfo.AddressList;
+ //得到ip
+ IPAddress ip = ipAddr[0];
+ //组合出远程终结点
+ IPEndPoint ipEndPoint = new IPEndPoint(ip, 80);
+ //创建Socket 实例
+ Socket socketClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+
+ //尝试连接
+ socketClient.Connect(ipEndPoint);
+ //发送请求
+ Send(socketClient);
+
+ Task.Run(() =>
+ {
+ //接收服务器的响应
+ Receive(socketClient);
+ });
+ }
+
+ ///
+ /// 接收来自服务端的消息
+ ///
+ ///
+ void Receive(Socket socketClient)
+ {
+ byte[] data = new byte[1024 * 1024];
+ while (true)
+ {
+ //读取客户端发送过来的数据
+ int readLeng = socketClient.Receive(data, 0, data.Length, SocketFlags.None);
+ if (readLeng == 0)//客户端断开连接
+ {
+ textBox2.Text += $"{socketClient.RemoteEndPoint}强行断开连接\r\n";
+ return;
+ }
+ textBox2.AppendText($"{socketClient.RemoteEndPoint}:{Encoding.UTF8.GetString(data, 0, readLeng)}\r\n");
+ }
+ }
+
+ ///
+ /// 发送消息到服务端
+ ///
+ ///
+ ///
+ void Send(Socket socketClient)
+ {
+ var msg = $"GET / HTTP/1.1\r\nHost: {new Uri(textBox1.Text).Host}\r\n\r\n";
+ socketClient.Send(Encoding.UTF8.GetBytes(msg));
+ }
+ }
+}
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.resx" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.resx"
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Form1.resx"
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Program.cs" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Program.cs"
new file mode 100644
index 0000000..4868d21
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Program.cs"
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace SimulateHttpGet
+{
+ static class Program
+ {
+ ///
+ /// 应用程序的主入口点。
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/AssemblyInfo.cs" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/AssemblyInfo.cs"
new file mode 100644
index 0000000..de14758
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/AssemblyInfo.cs"
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("SimulateHttpGet")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("SimulateHttpGet")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("b183fd73-5315-46d0-b737-4be566079a6f")]
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Resources.Designer.cs" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Resources.Designer.cs"
new file mode 100644
index 0000000..ed7f5c8
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Resources.Designer.cs"
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace SimulateHttpGet.Properties
+{
+
+
+ ///
+ /// 强类型资源类,用于查找本地化字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// 返回此类使用的缓存 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SimulateHttpGet.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 覆盖当前线程的 CurrentUICulture 属性
+ /// 使用此强类型的资源类的资源查找。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Resources.resx" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Resources.resx"
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Resources.resx"
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Settings.Designer.cs" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Settings.Designer.cs"
new file mode 100644
index 0000000..ee2bf77
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Settings.Designer.cs"
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace SimulateHttpGet.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Settings.settings" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Settings.settings"
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/Properties/Settings.settings"
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/\346\250\241\346\213\237\346\265\217\350\247\210\345\231\250\347\232\204get\350\257\267\346\261\202.csproj" "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/\346\250\241\346\213\237\346\265\217\350\247\210\345\231\250\347\232\204get\350\257\267\346\261\202.csproj"
new file mode 100644
index 0000000..f443339
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SimulateHttpGet/\346\250\241\346\213\237\346\265\217\350\247\210\345\231\250\347\232\204get\350\257\267\346\261\202.csproj"
@@ -0,0 +1,83 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {B183FD73-5315-46D0-B737-4BE566079A6F}
+ WinExe
+ SimulateHttpGet
+ SimulateHttpGet
+ v4.7.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/Socket\347\274\226\347\250\213/2HTTP/SocketChat.sln" "b/Socket\347\274\226\347\250\213/2HTTP/SocketChat.sln"
new file mode 100644
index 0000000..216ee1a
--- /dev/null
+++ "b/Socket\347\274\226\347\250\213/2HTTP/SocketChat.sln"
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29324.140
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "模拟浏览器的get请求", "SimulateHttpGet\模拟浏览器的get请求.csproj", "{B183FD73-5315-46D0-B737-4BE566079A6F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "模拟Web服务器", "HTTPServer\模拟Web服务器.csproj", "{43EDAB42-A779-4AFF-85D2-C6E12E0BA3FA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B183FD73-5315-46D0-B737-4BE566079A6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B183FD73-5315-46D0-B737-4BE566079A6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B183FD73-5315-46D0-B737-4BE566079A6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B183FD73-5315-46D0-B737-4BE566079A6F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {43EDAB42-A779-4AFF-85D2-C6E12E0BA3FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {43EDAB42-A779-4AFF-85D2-C6E12E0BA3FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {43EDAB42-A779-4AFF-85D2-C6E12E0BA3FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {43EDAB42-A779-4AFF-85D2-C6E12E0BA3FA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {5C201C99-8DB1-46F2-994F-AFCD7098B518}
+ EndGlobalSection
+EndGlobal