登录
首页 » 套接字网络编程 » 心跳检测

心跳检测

于 2023-01-13 发布 文件大小:5.18 kB
0 183
下载积分: 2 下载次数: 1

代码说明:

判断对方(设备,进程或其它网元)是否正常动行,一般采用定时发送简单的通讯包,如果在指定时间段内未收到对方响应,则判断对方已经当掉。用于检测TCP的异常断开。基本原因是服务器端不能有效的判断客户端是否在线也就是说,服务器无法区分客户端是长时间在空闲,还是已经掉线的情况。所谓的心跳包就是客户端定时发送简单的信息给服务器端告诉它我还在而已。代码就是每隔几分钟发送一个固定信息给服务端,服务端收到后回复一个固定信息。如果服务端几分钟内没有收到客户端信息则视客户端断开。比如有些通信软件长时间不使用,要想知道它的状态是在线还是离线就需要心跳包,定时发包收包。

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

发表评论

0 个回复

  • telnet客户端
    telnet客户端-telnet customer end
    2022-02-20 23:33:46下载
    积分:1
  • tcpipstack源序用于C51的TCP/IP协议栈,,C
    tcpipstack源程序用于C51的TCP/IP协议栈,,C-C++,TCP/IP Stack -tcpipstack C51 source for the TCP/IP protocol stack, and C-C, TCP/IP Stack
    2022-12-14 23:30:03下载
    积分:1
  • Socket 文件发送示例
    VS2008写的定时批量上传指定目录JPEG格式文件到服务器的小程序,上传完毕后删除本地文件。 使用方法为: 1.客户端内有Host.txt写服务器的名称或IP地址,MonitorDirectoryList.txt写需要监控的目录。 2.服务器端的directory.txt写服务器上需要保存的目录。 3.启动服务端与客户端。
    2022-06-30 09:11:01下载
    积分:1
  • DNSQuery,能查询域名是否注册,给定一个ip可查询它所指向的域名...
    DNSQuery,能查询域名是否注册,给定一个ip可查询它所指向的域名-DNSQuery can inquiries whether the domain name registration, to be scheduled for an ip it directly to the domain name
    2022-11-15 15:05:03下载
    积分:1
  • 对等通信
    peer to peer communication
    2023-08-25 19:20:03下载
    积分:1
  • 序是一个通过WINSOKET来写的序,和用到了串口,实现计算发送信息量是多少。...
    此程序是一个通过WINSOKET来编写的程序,和用到了串口编程,实现计算发送信息量是多少。-this procedure is a WINSOKET through the procedures to prepare, and used the serial programming, achieve this calculation is the amount of information.
    2023-08-03 02:10:03下载
    积分:1
  • dns inquiry procedures, listed under the name ip addr
    dns查询程序,根据name列出ip addr-dns inquiry procedures, listed under the name ip addr
    2022-01-25 19:24:13下载
    积分:1
  • /* This IPv4 example listens for incoming packets and automatically adds destina...
    /* This IPv4 example listens for incoming packets and automatically adds destinations for new sources. 这个例子主要是让大家了解下面3个函数的用法。 void OnNewSource(RTPSourceData *dat) void OnBYEPacket(RTPSourceData *dat) void OnRemoveSource(RTPSourceData *dat) 具体内容看我的测试文档吧。 例子的中文解释都由hanyuejun添加,有任何疑问请发hanyuejun2006@163.com */-/* This IPv4 example listens for incoming packets and automatically adds destinations for new sources. This example is designed to allow everyone to understand the following three functions usage. void OnNewSource (RTPSourceData* dat) void OnBYEPacket (RTPSourceData* dat) void OnRemoveSource (RTPSourceData* dat) the specific content of the test document I watch it. Explained by the example of the Chinese hanyuejun add, have any questions please send hanyuejun2006@163.com* /
    2022-03-26 07:31:21下载
    积分:1
  • 本代码演示了FTP,HTTP多线断点,使用vc开发
    本代码演示了FTP,HTTP多线程断点,使用vc开发-This code demonstrates the FTP, HTTP multi-threaded breakpoint
    2023-08-10 09:50:03下载
    积分:1
  • 页恢复ie代码
    网页恢复ie代码-website restore ie code
    2022-04-25 16:06:26下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载