【实例简介】
基于C#的TCP/IP协议客户端和服务器的代码实现,全代码附上,还有部分关键代码的解释
【实例截图】
【核心代码】
tcp协议
└── tcp协议
├── tcpclient
│ ├── tcpclient
│ │ ├── tcpclient
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ ├── tcpclient.exe
│ │ │ │ ├── tcpclient.pdb
│ │ │ │ ├── tcpclient.vshost.exe
│ │ │ │ └── tcpclient.vshost.exe.manifest
│ │ │ ├── Form1.cs
│ │ │ ├── Form1.Designer.cs
│ │ │ ├── Form1.resx
│ │ │ ├── obj
│ │ │ │ └── Debug
│ │ │ │ ├── tcpclient.client.resources
│ │ │ │ ├── tcpclient.csproj.FileListAbsolute.txt
│ │ │ │ ├── tcpclient.csproj.GenerateResource.Cache
│ │ │ │ ├── tcpclient.exe
│ │ │ │ ├── tcpclient.pdb
│ │ │ │ └── tcpclient.Properties.Resources.resources
│ │ │ ├── Program.cs
│ │ │ ├── Properties
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── Resources.Designer.cs
│ │ │ │ ├── Resources.resx
│ │ │ │ ├── Settings.Designer.cs
│ │ │ │ └── Settings.settings
│ │ │ └── tcpclient.csproj
│ │ ├── tcpclient.sln
│ │ └── tcpclient.suo
│ ├── tcpclient - 副本
│ │ ├── tcpclient
│ │ │ ├── bin
│ │ │ │ └── Debug
│ │ │ │ ├── tcpclient.exe
│ │ │ │ ├── tcpclient.pdb
│ │ │ │ ├── tcpclient.vshost.exe
│ │ │ │ └── tcpclient.vshost.exe.manifest
│ │ │ ├── Form1.cs
│ │ │ ├── Form1.Designer.cs
│ │ │ ├── Form1.resx
│ │ │ ├── obj
│ │ │ │ └── Debug
│ │ │ │ ├── tcpclient.client.resources
│ │ │ │ ├── tcpclient.csproj.FileListAbsolute.txt
│ │ │ │ ├── tcpclient.csproj.GenerateResource.Cache
│ │ │ │ ├── tcpclient.exe
│ │ │ │ ├── tcpclient.pdb
│ │ │ │ └── tcpclient.Properties.Resources.resources
│ │ │ ├── Program.cs
│ │ │ ├── Properties
│ │ │ │ ├── AssemblyInfo.cs
│ │ │ │ ├── Resources.Designer.cs
│ │ │ │ ├── Resources.resx
│ │ │ │ ├── Settings.Designer.cs
│ │ │ │ └── Settings.settings
│ │ │ └── tcpclient.csproj
│ │ ├── tcpclient.sln
│ │ └── tcpclient.suo
│ └── tcpclient - 副本 (2)
│ ├── tcpclient
│ │ ├── bin
│ │ │ └── Debug
│ │ │ ├── tcpclient.exe
│ │ │ ├── tcpclient.pdb
│ │ │ ├── tcpclient.vshost.exe
│ │ │ └── tcpclient.vshost.exe.manifest
│ │ ├── Form1.cs
│ │ ├── Form1.Designer.cs
│ │ ├── Form1.resx
│ │ ├── obj
│ │ │ └── Debug
│ │ │ ├── tcpclient.client.resources
│ │ │ ├── tcpclient.csproj.FileListAbsolute.txt
│ │ │ ├── tcpclient.csproj.GenerateResource.Cache
│ │ │ ├── tcpclient.exe
│ │ │ ├── tcpclient.pdb
│ │ │ └── tcpclient.Properties.Resources.resources
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ └── tcpclient.csproj
│ ├── tcpclient.sln
│ └── tcpclient.suo
└── tcpserver
├── tcpserver
│ ├── bin
│ │ └── Debug
│ │ ├── tcpserver.exe
│ │ ├── tcpserver.pdb
│ │ ├── tcpserver.vshost.exe
│ │ └── tcpserver.vshost.exe.manifest
│ ├── Form1.cs
│ ├── Form1.Designer.cs
│ ├── Form1.resx
│ ├── obj
│ │ └── Debug
│ │ ├── tcpserver.csproj.FileListAbsolute.txt
│ │ ├── tcpserver.csproj.GenerateResource.Cache
│ │ ├── tcpserver.exe
│ │ ├── tcpserver.pdb
│ │ ├── tcpserver.Properties.Resources.resources
│ │ └── tcpserver.tcpserver.resources
│ ├── Program.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── server.cs
│ └── tcpserver.csproj
├── tcpserver.sln
└── tcpserver.suo
30 directories, 89 files