登录
首页 » 套接字网络编程 » c++ socket编程实例(含服务端和客户端及日志写入)

c++ socket编程实例(含服务端和客户端及日志写入)

于 2022-04-16 发布 文件大小:2.52 kB
0 182
下载积分: 2 下载次数: 1

代码说明:

本代码是c++ socket编程实例。包含服务端和客户端代码,可以实现客户端发送消息,服务端接收消息并写入日志。server.cpp为服务端。client.cpp为客户端。首先,需要准备好C++环境。先编译运行server.cpp,显示:“server is start,waiting for client.”表示启动成功。再编译运行client.cpp,这时再看服务端,显示:“Hello, This is client whg”,表示收到客户端发来的消息。

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

发表评论

0 个回复

  • 刚学VC时写的文件传输序,全部用SocketAPI
    刚学VC时写的文件传输程序,全部用SocketAPI编写-just learning to write when the file transfer process, all prepared with Socket API
    2022-05-13 00:00:42下载
    积分:1
  • 电子邮件检查
    电子邮件检查程序-E-mail inspection procedures
    2022-11-10 18:55:04下载
    积分:1
  • 整个企业一个很好的源代码。稍加修改就可以了。
    一个很好的企业整站的ASP的源码。稍加修改就可直接使用。-The whole enterprise a very good source ASP station. A little modification can be used directly.
    2022-06-30 12:14:09下载
    积分:1
  • 静态防火墙代码的基础上在SDN天花控制
    这是一个静态的防火墙代码用Python编写,并运行在SDN天花控制器。您需要添加要在黑名单来阻止主机。this is a static firewall code written in python, and was ran in pox controller in SDN. you need to add the host which you want to block in the blacklist. 
    2022-02-04 16:30:00下载
    积分:1
  • based on the MAC address of the network card physical communications category, c...
    基于MAC网卡物理地址的通信类,可实现不同网段之间通信本类为C++源码需要 winpcap 支持 winpcap 官方地址 http://www.winpcap.org/ winpcap 3.0通过测试。 -based on the MAC address of the network card physical communications category, can be realized between different segments of the communications category C source code needed to support winpcap winpcap official address h ttp :// www.winpcap.org/ winpcap 3.0 to pass the test.
    2022-05-22 04:12:55下载
    积分:1
  • DELPHI实现TCP CLIENT
    通过多线程方式实现TCP连接,tthread,tcp client,2进制数据传送,可方便实现各种工业控制协议MODBUS TCP,程序不卡
    2022-05-20 12:12:41下载
    积分:1
  • Wireless Mesh Network is a high
    无线网状网是一种高速率、高容量的多点对多点网络,可把它看成是Ad Hoc网络的简化版本。正如Ad Ho。网络一样,无线网状网中的路由是它的一项关键技术。基于此,本论文对无线网状网的路由协议进行研究。 文中首先介绍了无线网状网的结构,特点以及其发展与现状 其次,分析了Ad hoc网络中各种路由协议的优劣 再次,重点研究了其中的一种动态源路由协议(DSR)的具体实现过程 在DSR的基础上,对其进行改进,提出了一种均衡流量动态源路由协议,对它进行性能分析和仿真。-Wireless Mesh Network is a high-speed, high-capacity multi-point-to-multipoint network, it could be seen as Ad Hoc networks, a simplified version. As the Ad Ho. Networks, wireless mesh routing is a key technology. Based on this, the thesis of the wireless mesh routing protocol research. First, wireless mesh networks, introduced the structure, characteristics and status of its development and secondly, an analysis of Ad hoc network routing protocols in a variety of advantages and disadvantages again, focused on one of the Dynamic Source Routing Protocol (DSR) concrete realization of the process in DSR based on its improvement, a balanced flow of dynamic source routing protocol, its performance analysis and simulation.
    2023-06-24 08:30:04下载
    积分:1
  • 湖北电信SOA平台短信发送实例,做SP的朋友可能有用(中兴平台)...
    湖北电信SOA平台短信发送实例,做SP的朋友可能有用(中兴平台)-Hubei Telecom to send message SOA platform examples, so a friend may be useful SP (ZTE platform)
    2022-06-01 00:09:18下载
    积分:1
  • 本实例将通过ISAPI提供的功能实现访问控制过滤器(Autentication Filter)。可以设定最大访问用户的数量以及授权用户名和密码。...
    本实例将通过ISAPI提供的功能实现访问控制过滤器(Autentication Filter)。可以设定最大访问用户的数量以及授权用户名和密码。-example through the provision of functional ISAPI access control filters (Autentication Filter). The visit can set a maximum number of users and the authorized user name and password.
    2022-12-07 16:35:03下载
    积分:1
  • cccam dst cccam webmin
    webmin het werkt als trein 模 vertrekt 的 cccam 模块 probeer maar uit 强调 zeg het 玛珥
    2022-07-07 16:47:55下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载