文件名称:WinSocketSimple
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2013-10-12
- 文件大小:
- 56kb
- 下载次数:
- 0次
- 提 供 者:
- 薛**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
本程序为C#语言编写,版本为2010旗舰版 即10.0
本解决方案中包含两个实现的SocKet客户端的实例。
Form1为本机发个自身的,使用前,先要点击“开始接收”按钮,然后发送数据,即将发送的数据显示在Text2中。
Form2为接收从某设备发送来的数据。
默认情况下运行的为Form1窗体
Application.Run(new Form1())
//Application.Run(new Form2())
如果想运行Form2窗体 请打开项目,找到文件Program.cs,替换
Application.Run(new Form1())
//Application.Run(new Form2())
为
//Application.Run(new Form1())
Application.Run(new Form2())
当运行Form2时,如过接收到的数据为乱码,请到代码窗口找到
//string receivedStr = System.Text.Encoding.Unicode.GetString(buffer)
对编码进行修改,并注释掉下行。
string receivedStr = System.Text.Encoding.UTF8.GetString(buffer) -C# SocKet Client
本解决方案中包含两个实现的SocKet客户端的实例。
Form1为本机发个自身的,使用前,先要点击“开始接收”按钮,然后发送数据,即将发送的数据显示在Text2中。
Form2为接收从某设备发送来的数据。
默认情况下运行的为Form1窗体
Application.Run(new Form1())
//Application.Run(new Form2())
如果想运行Form2窗体 请打开项目,找到文件Program.cs,替换
Application.Run(new Form1())
//Application.Run(new Form2())
为
//Application.Run(new Form1())
Application.Run(new Form2())
当运行Form2时,如过接收到的数据为乱码,请到代码窗口找到
//string receivedStr = System.Text.Encoding.Unicode.GetString(buffer)
对编码进行修改,并注释掉下行。
string receivedStr = System.Text.Encoding.UTF8.GetString(buffer) -C# SocKet Client
(系统自动生成,下载前可以参看下载内容)
下载文件列表
WinSocketSimple\WinSocketSimple\bin\Debug\WindowsFormsApplication1.exe
...............\...............\...\.....\WindowsFormsApplication1.pdb
...............\...............\...\.....\WindowsFormsApplication1.vshost.exe
...............\...............\...\.....\WindowsFormsApplication1.vshost.exe.manifest
...............\...............\ClassDiagram1.cd
...............\...............\Form.Designer.cs
...............\...............\Form1.cs
...............\...............\Form1.Designer.cs
...............\...............\Form1.resx
...............\...............\Form2.cs
...............\...............\Form2.Designer.cs
...............\...............\Form2.resx
...............\...............\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
...............\...............\...\...\.....\DesignTimeResolveAssemblyReferencesInput.cache
...............\...............\...\...\.....\GenerateResource.read.1.tlog
...............\...............\...\...\.....\GenerateResource.write.1.tlog
...............\...............\...\...\.....\WindowsFormsApplication1.csproj.FileListAbsolute.txt
...............\...............\...\...\.....\WindowsFormsApplication1.exe
...............\...............\...\...\.....\WindowsFormsApplication1.Form2.resources
...............\...............\...\...\.....\WindowsFormsApplication1.pdb
...............\...............\...\...\.....\WindowsFormsApplication1.Properties.Resources.resources
...............\...............\...\...\.....\WinSocketSimple.csproj.FileListAbsolute.txt
...............\...............\...\...\.....\WinSocketSimple.Form1.resources
...............\...............\...\...\.....\WinSocketSimple.Form2.resources
...............\...............\Program.cs
...............\...............\...perties\AssemblyInfo.cs
...............\...............\..........\Resources.Designer.cs
...............\...............\..........\Resources.resx
...............\...............\..........\Settings.Designer.cs
...............\...............\..........\Settings.settings
...............\...............\WinSocketSimple.csproj
...............\WinSocketSimple.sln
...............\WinSocketSimple.suo
...............\实验使用说明.txt
...............\WinSocketSimple\obj\x86\Debug\TempPE
...............\...............\...\...\Debug
...............\...............\bin\Debug
...............\...............\obj\x86
...............\...............\bin
...............\...............\obj
...............\...............\Properties
...............\WinSocketSimple
WinSocketSimple