文件名称:SocketCommunication
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 88kb
- 下载次数:
- 0次
- 提 供 者:
- 谢*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Socket实现客户端与服务端通信源码
程序说明:
开发工具:Visual Studio 2005
本程序演示了Socket通信的基本原理,非常适合初学者。程序分为两部分:服务器端与客户端,实际上客户端也可以充当服务器端,本程序两端的区别在于服务器端要发送数据必须要有客户端的连接作为基础,而客户端没有此限制。希望本示例能够给大家学习SOCKET带来帮助。
注意事项:
1.运行程序之前请先设定好服务器端的IP地址,在客户端程序中的设置-》服务器IP设置,可更改为具体服务器的IP地址,否则程序将不能正常运行
2.运行服务器端程序,运行后服务器端会自动以本地的IP地址与预设的端口号开启监听。本程序可以在局域网中实现简单的通信,但是只能向服务器发送数据,然后服务器向指定的客户端发送数据。大家可以在此基础上对程序进行更改,让局域网上的每个用户都可以聊天。
-Socket to achieve client and server communication source
Program Descr iption:
Development Tools: Visual Studio 2005
This program demonstrates the basic principles of Socket Communications, is suitable for beginners. Program is divided into two parts: the server side and client side, in fact, clients can also act as a server-side, the difference between both ends of this procedure is to send the data server must have a connection as a basis for the client, but client does not have this limitation. Hope this example will be helpful for everyone to learn SOCKET.
Note:
1. Run the program before you set up the IP address of the server, the client program settings- the "server IP settings, change the IP address for a specific server, otherwise the program will not run
2. Run the server-side program will run automatically after the server s IP address and the default local port number of open listening. This procedure can be implemented in a simple local area network communications, but
程序说明:
开发工具:Visual Studio 2005
本程序演示了Socket通信的基本原理,非常适合初学者。程序分为两部分:服务器端与客户端,实际上客户端也可以充当服务器端,本程序两端的区别在于服务器端要发送数据必须要有客户端的连接作为基础,而客户端没有此限制。希望本示例能够给大家学习SOCKET带来帮助。
注意事项:
1.运行程序之前请先设定好服务器端的IP地址,在客户端程序中的设置-》服务器IP设置,可更改为具体服务器的IP地址,否则程序将不能正常运行
2.运行服务器端程序,运行后服务器端会自动以本地的IP地址与预设的端口号开启监听。本程序可以在局域网中实现简单的通信,但是只能向服务器发送数据,然后服务器向指定的客户端发送数据。大家可以在此基础上对程序进行更改,让局域网上的每个用户都可以聊天。
-Socket to achieve client and server communication source
Program Descr iption:
Development Tools: Visual Studio 2005
This program demonstrates the basic principles of Socket Communications, is suitable for beginners. Program is divided into two parts: the server side and client side, in fact, clients can also act as a server-side, the difference between both ends of this procedure is to send the data server must have a connection as a basis for the client, but client does not have this limitation. Hope this example will be helpful for everyone to learn SOCKET.
Note:
1. Run the program before you set up the IP address of the server, the client program settings- the "server IP settings, change the IP address for a specific server, otherwise the program will not run
2. Run the server-side program will run automatically after the server s IP address and the default local port number of open listening. This procedure can be implemented in a simple local area network communications, but
(系统自动生成,下载前可以参看下载内容)
下载文件列表
SocketCommunication\ClientSocket\ClientSocket\app.config
...................\............\............\bin\Debug\ClientSocketForms.exe
...................\............\............\...\.....\ClientSocketForms.exe.config
...................\............\............\...\.....\ClientSocketForms.pdb
...................\............\............\...\.....\ClientSocketForms.vshost.exe
...................\............\............\...\.....\ClientSocketForms.vshost.exe.config
...................\............\............\...\Debug
...................\............\............\bin
...................\............\............\ClientSocketForms.csproj
...................\............\............\ClientSocketTestForm.cs
...................\............\............\ClientSocketTestForm.Designer.cs
...................\............\............\ClientSocketTestForm.resx
...................\............\............\obj\ClientSocketForms.csproj.FileListAbsolute.txt
...................\............\............\...\Debug\ClientSocketForms.ClientSocketTestForm.resources
...................\............\............\...\.....\ClientSocketForms.csproj.GenerateResource.Cache
...................\............\............\...\.....\ClientSocketForms.exe
...................\............\............\...\.....\ClientSocketForms.pdb
...................\............\............\...\.....\ClientSocketForms.Properties.Resources.resources
...................\............\............\...\.....\ClientSocketForms.ServerIPForm.resources
...................\............\............\...\.....\TempPE\Properties.Resources.Designer.cs.dll
...................\............\............\...\.....\TempPE
...................\............\............\...\.....\Refactor
...................\............\............\...\Debug
...................\............\............\obj
...................\............\............\Program.cs
...................\............\............\...perties\AssemblyInfo.cs
...................\............\............\..........\Resources.Designer.cs
...................\............\............\..........\Resources.resx
...................\............\............\..........\Settings.Designer.cs
...................\............\............\..........\Settings.settings
...................\............\............\Properties
...................\............\............\ServerIPForm.cs
...................\............\............\ServerIPForm.Designer.cs
...................\............\............\ServerIPForm.resx
...................\............\ClientSocket
...................\............\ClientSocket.sln
...................\............\ClientSocket.suo
...................\ClientSocket
...................\ServerSocket\ServerSocket.sln
...................\............\ServerSocket.suo
...................\............\............Forms\bin\Debug\ServerSocketForms.exe
...................\............\.................\...\.....\ServerSocketForms.pdb
...................\............\.................\...\.....\ServerSocketForms.vshost.exe
...................\............\.................\...\Debug
...................\............\.................\bin
...................\............\.................\obj\Debug\ServerSocketForms.csproj.GenerateResource.Cache
...................\............\.................\...\.....\ServerSocketForms.exe
...................\............\.................\...\.....\ServerSocketForms.pdb
...................\............\.................\...\.....\ServerSocketForms.Properties.Resources.resources
...................\............\.................\...\.....\ServerSocketForms.ServerSocketTestForm.resources
...................\............\.................\...\.....\Refactor
...................\............\.................\...\.....\TempPE
...................\............\.................\...\Debug
...................\............\.................\...\ServerSocketForms.csproj.FileListAbsolute.txt
...................\............\.................\obj
...................\............\....
...................\............\............\bin\Debug\ClientSocketForms.exe
...................\............\............\...\.....\ClientSocketForms.exe.config
...................\............\............\...\.....\ClientSocketForms.pdb
...................\............\............\...\.....\ClientSocketForms.vshost.exe
...................\............\............\...\.....\ClientSocketForms.vshost.exe.config
...................\............\............\...\Debug
...................\............\............\bin
...................\............\............\ClientSocketForms.csproj
...................\............\............\ClientSocketTestForm.cs
...................\............\............\ClientSocketTestForm.Designer.cs
...................\............\............\ClientSocketTestForm.resx
...................\............\............\obj\ClientSocketForms.csproj.FileListAbsolute.txt
...................\............\............\...\Debug\ClientSocketForms.ClientSocketTestForm.resources
...................\............\............\...\.....\ClientSocketForms.csproj.GenerateResource.Cache
...................\............\............\...\.....\ClientSocketForms.exe
...................\............\............\...\.....\ClientSocketForms.pdb
...................\............\............\...\.....\ClientSocketForms.Properties.Resources.resources
...................\............\............\...\.....\ClientSocketForms.ServerIPForm.resources
...................\............\............\...\.....\TempPE\Properties.Resources.Designer.cs.dll
...................\............\............\...\.....\TempPE
...................\............\............\...\.....\Refactor
...................\............\............\...\Debug
...................\............\............\obj
...................\............\............\Program.cs
...................\............\............\...perties\AssemblyInfo.cs
...................\............\............\..........\Resources.Designer.cs
...................\............\............\..........\Resources.resx
...................\............\............\..........\Settings.Designer.cs
...................\............\............\..........\Settings.settings
...................\............\............\Properties
...................\............\............\ServerIPForm.cs
...................\............\............\ServerIPForm.Designer.cs
...................\............\............\ServerIPForm.resx
...................\............\ClientSocket
...................\............\ClientSocket.sln
...................\............\ClientSocket.suo
...................\ClientSocket
...................\ServerSocket\ServerSocket.sln
...................\............\ServerSocket.suo
...................\............\............Forms\bin\Debug\ServerSocketForms.exe
...................\............\.................\...\.....\ServerSocketForms.pdb
...................\............\.................\...\.....\ServerSocketForms.vshost.exe
...................\............\.................\...\Debug
...................\............\.................\bin
...................\............\.................\obj\Debug\ServerSocketForms.csproj.GenerateResource.Cache
...................\............\.................\...\.....\ServerSocketForms.exe
...................\............\.................\...\.....\ServerSocketForms.pdb
...................\............\.................\...\.....\ServerSocketForms.Properties.Resources.resources
...................\............\.................\...\.....\ServerSocketForms.ServerSocketTestForm.resources
...................\............\.................\...\.....\Refactor
...................\............\.................\...\.....\TempPE
...................\............\.................\...\Debug
...................\............\.................\...\ServerSocketForms.csproj.FileListAbsolute.txt
...................\............\.................\obj
...................\............\....