資源簡介
一個服務器,多客戶端,客戶端可以向服務器發送信息,服務器可以同時向多個客戶端發送信息
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Net;
using?System.Net.Sockets;
using?System.Threading;
namespace?TCPClient
{
????public?partial?class?Form1?:?Form
????{
????????public?Socket?newclient;
????????public?bool?Connected;
????????public?Thread?myThread;
????????public?delegate?void?MyInvoke(string?str);
????????public?Form1()
????????{
????????????InitializeComponent();
????????????
????????}
????????public?void?Connect()
????????{
????????????byte[]?data?=?new?byte[1024];
????????????newclient?=?new?Socket(AddressFamily.InterNetwork?SocketType.Stream?ProtocolType.Tcp);
????????????string?ipadd?=?server
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2970??2010-06-02?14:48??C#實驗\TCPClient\Backup\Form1.cs
?????文件???????5992??2010-06-02?12:27??C#實驗\TCPClient\Backup\Form1.Designer.cs
?????文件???????5814??2010-06-02?12:27??C#實驗\TCPClient\Backup\Form1.resx
?????文件????????504??2010-05-31?14:28??C#實驗\TCPClient\Backup\Program.cs
?????文件???????1368??2010-05-31?10:58??C#實驗\TCPClient\Backup\Properties\AssemblyInfo.cs
?????文件???????2868??2010-05-31?10:58??C#實驗\TCPClient\Backup\Properties\Resources.Designer.cs
?????文件???????5612??2010-05-31?10:58??C#實驗\TCPClient\Backup\Properties\Resources.resx
?????文件???????1094??2010-05-31?10:58??C#實驗\TCPClient\Backup\Properties\Settings.Designer.cs
?????文件????????249??2010-05-31?10:58??C#實驗\TCPClient\Backup\Properties\Settings.settings
?????文件???????3764??2010-05-31?12:03??C#實驗\TCPClient\Backup\TCPClient.csproj
?????文件????????907??2010-05-31?10:58??C#實驗\TCPClient\Backup\TCPClient.sln
????..A..H.?????15872??2010-06-02?20:30??C#實驗\TCPClient\Backup\TCPClient.v12.suo
?????文件??????11776??2015-12-22?14:02??C#實驗\TCPClient\bin\Debug\TCPClient.exe
?????文件??????30208??2015-12-22?14:02??C#實驗\TCPClient\bin\Debug\TCPClient.pdb
?????文件???????5138??2010-06-02?17:49??C#實驗\TCPClient\bin\Debug\TCPClient.rar
?????文件??????21656??2015-12-22?13:49??C#實驗\TCPClient\bin\Debug\TCPClient.vshost.exe
?????文件????????490??2013-03-18?17:00??C#實驗\TCPClient\bin\Debug\TCPClient.vshost.exe.manifest
?????文件???????2970??2015-12-22?14:02??C#實驗\TCPClient\Form1.cs
?????文件???????7132??2015-12-22?14:02??C#實驗\TCPClient\Form1.Designer.cs
?????文件???????5814??2015-12-22?14:02??C#實驗\TCPClient\Form1.resx
?????文件????????791??2015-12-22?13:50??C#實驗\TCPClient\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6840??2015-12-22?13:49??C#實驗\TCPClient\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????1304??2015-12-22?14:02??C#實驗\TCPClient\obj\Debug\TCPClient.csproj.FileListAbsolute.txt
?????文件????????847??2015-12-22?14:02??C#實驗\TCPClient\obj\Debug\TCPClient.csproj.GenerateResource.Cache
?????文件??????11776??2015-12-22?14:02??C#實驗\TCPClient\obj\Debug\TCPClient.exe
?????文件????????180??2015-12-22?14:02??C#實驗\TCPClient\obj\Debug\TCPClient.Form1.resources
?????文件??????30208??2015-12-22?14:02??C#實驗\TCPClient\obj\Debug\TCPClient.pdb
?????文件????????180??2015-12-22?14:02??C#實驗\TCPClient\obj\Debug\TCPClient.Properties.Resources.resources
?????文件???????4608??2015-12-22?13:49??C#實驗\TCPClient\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件????????504??2010-05-31?14:28??C#實驗\TCPClient\Program.cs
............此處省略74個文件信息
- 上一篇:C# 遠程控制軟件源碼
- 下一篇:udp通信(網絡會議/聊天/廣播等功能)
評論
共有 條評論