登录
首页 » C# » socket长连接短连接,自己封装的

socket长连接短连接,自己封装的

于 2021-05-29 发布
0 202
下载积分: 1 下载次数: 1

代码说明:

Socket通讯,长连接短链接,包分 包头、指令、内容 包头一般2-4个字节 表示包的长度,指令2个字节 表示做什么操作,内容是具体数据

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • SerialPort_vc
    一个关于串口通信编程的小程序,使用visual c++编写。(Serial communication programming on small procedures, the use of visual c++ Prepared.)
    2007-07-16 15:57:05下载
    积分:1
  • TCP-UDP
    TCP与UDP源代码测试程序,方便初学者观看,理解。用VC写的,容易读懂。。(TCP and UDP code for ABC to use)
    2012-06-17 11:38:04下载
    积分:1
  • Single-threaded-file-transfer
    实现单线程文件传输,不支持断点传出,功能相对简单,但是性能很好。(Achieve single-threaded file transfer, does not support breakpoints spread, function is relatively simple, but the performance is very good.)
    2013-06-11 12:51:41下载
    积分:1
  • C# pop3 邮件接收
    private void Connect_Click(object sender, System.EventArgs e)        {            //将光标置为等待状态            Cursor cr = Cursor.Current;            Cursor.Current = Cursors.WaitCursor;            String a ,b,c;              //用110端口新建POP3服务器连接            Server = new TcpClient(PopServer.Text, 110);            Status.Items.Clear();             try            {                //初始化                NetStrm = Server.GetStream();                RdStrm = new StreamReader(Server.GetStream());                Status.Items.Add(RdStrm.ReadLine());                 //登录服务器过程                Data = "USER " Username.Text CRLF;                szData = System.Text.Encoding.ASCII.GetBytes(Data.ToCharArray());                NetStrm.Write(szData, 0, szData.Length);                Status.Items.Add(RdStrm.ReadLine());                 Data = "PASS " Password.Text CRLF;                szData = System.Text.Encoding.ASCII.GetBytes(Data.ToCharArray());                NetStrm.Write(szData, 0, szData.Length);                Status.Items.Add(RdStrm.ReadLine());                 //向服务器发送STAT命令,从而取得邮箱的相关信息:邮件数量和大小                Data = "STAT" CRLF;                szData = System.Text.Encoding.ASCII.GetBytes(Data.ToCharArray());                NetStrm.Write(szData, 0, szData.Length);                //Status.Items.Add(RdStrm.ReadLine());                 //改变按钮的状态                Connect.Enabled = false;                Disconnect.Enabled = true;                Retrieve.Enabled = true;                 //将光标置回原来状态                Cursor.Current = cr;             }            catch (InvalidOperationException err)            {                Status.Items.Add("Error: " err.ToString());            }        }
    2014-11-02下载
    积分:1
  • Microsoft.Press.Code.Complete.Second.Edition
    这是一本百科全书式的软件构建手册,强调提高软件质量的种种实践方法,不过这个是英文版的,中文版太大了,上传不了,有需要的请联系我(This is an encyclopedic handbook of software construction, with emphasis on increasing the variety of software quality practices. But this is the English version, the Chinese version too, can upload, it is necessary to please Contact)
    2007-05-08 09:42:09下载
    积分:1
  • Sockets
    TCP UDP socket通信以及event driven 实现(The TCP UDP socket communication as well as event driven implementation)
    2013-02-27 02:47:39下载
    积分:1
  • CQDUT
    A fully functional dialing program()
    2017-11-08 21:22:42下载
    积分:1
  • ConsoleApplication2
    多线程的应用,用加锁的方式来优化线程,体会加锁的重要性(Multithreading application)
    2018-05-14 18:04:12下载
    积分:1
  • dllNecSock
    将socket封装进DLL,提供上层应用,简单方便(Into the socket package DLL, the upper application is simple and convenient)
    2012-07-13 21:13:01下载
    积分:1
  • socket
    详细介绍一下VC下的socket编程,并提供一个服务器客户端具体的实例。希望对您有所帮助 (Detailed introduction of VC socket programming, and provide a server client a specific example. Hope will be helpful to you)
    2012-05-09 18:53:35下载
    积分:1
  • 696516资源总数
  • 106442会员总数
  • 11今日下载