Tcp协议收发数据 && Socket客户端监听服务器端处理方案
1.
https://blog.csdn.net/dl962454/article/details/78990735?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param
2.
https://blog.csdn.net/u011602967/article/details/50728443
3.
https://blog.csdn.net/ever_idea/article/details/80150862?utm_medium=distribute.pc_relevant_bbs_down.none-task-blog-baidujs-1.nonecase&depth_1-utm_source=distribute.pc_relevant_bbs_down.none-task-blog-baidujs-1.nonecase
4.
论坛:
https://bbs.csdn.net/topics/392144001
5.
https://blog.csdn.net/weixin_41835916/article/details/84314828
6.
https://www.cnblogs.com/jzxx/p/5630516.html
运行这个程序前需要先关闭Windows防火墙,Win7系统关闭防火墙的方法是在控制面板的“控制面板\系统和安全\Windows 防火墙\自定义设置”路径中,将“家庭或工作(专用)网络位置设置”和“公用网络位置设置”下面的选项都选到“关闭Windows防火墙(不推荐)”。
1.界面设计
左侧为发送数据的输入框,单击“发送数据”把数据发送到指定IP地址的指定端口号。(本例中,IP地址和端口号都被写死到代码中)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;
namespace TcpClientTest
{
public part