登录
首页 » Windows Socket编程 » WINSOCK服务器端示例程序说明 该程序是基于对话框编程的,是采用一对多的方式进行连接的。 整个程序主要由CServerDlg,CServerApp,CLis...

WINSOCK服务器端示例程序说明 该程序是基于对话框编程的,是采用一对多的方式进行连接的。 整个程序主要由CServerDlg,CServerApp,CLis...

于 2022-01-26 发布 文件大小:38.35 kB
0 202
下载积分: 2 下载次数: 1

代码说明:

WINSOCK服务器端示例程序说明 该程序是基于对话框编程的,是采用一对多的方式进行连接的。 整个程序主要由CServerDlg,CServerApp,CListenSocket,CClientSocket构成的。 (所有关于类的说明在代码中有) 下面简单介绍一下程序流程: 主程序调用CListenSocket类的对象来进行对Socket的监听,当收到请求时调用主程序的函数来处理相应的连接,把Socket放进队列中。 对于Socket的接收数据和断开连接是由消息来触发的,是通过调用基类CSocket中的虚函数重载来处理的。 注:详细的过程,在程序代码中均有注释!-Winsock server sample program note that the procedure was based on dialog programming, using one-to-many is the way to connect. The entire process by CServerDlg, CServerApp, CListenSocket, constitute the CClientSocket. (All categories on the note in code) The following outlines procedures have : main program called CListenSocket category to the target of the listening socket, when the call request is received when the main program functions to the corresponding connections, socket into the queue. Socket for the reception of data and disconnected from the news to trigger, by calling the base class CSocket the virtual function to handle the heavy load. Note : Details of the procedure code have Notes!

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

发表评论

0 个回复

  • 对WINSOCKET的完成端口模型进行封装的类,Delphi写的,效率不错!
    对WINSOCKET的完成端口模型进行封装的类,Delphi写的,效率不错! -WinSocket the completion of the port model of the type of package, Delphi written good efficiency!
    2022-07-08 20:51:55下载
    积分:1
  • smtp source code collections, a total of seven, including the sending and receiv...
    smtp源代码集合,一共7个,包括发送和接收-smtp source code collections, a total of seven, including the sending and receiving
    2022-08-08 08:21:08下载
    积分:1
  • P2P c++ sdk
    P2P dll c++ ,  static emReturnType SetAppType(emAppType AppType);//设置程序类型,服务器emAppType_Server或者客户端emAppType_Client  static emReturnType SetClientCallback(IMsgCallback *pMsgCallback);//设置回调类,回调类继承IMsgCallback接口  static emReturnType Startup();//开启网络  static emReturnType Cleanup();//关闭网络  //Server  以下函数是服务器调用  static emReturnType BeginService(unsigned short nPort);//如果是服务器,调用该函数开启服务,nPort:端口号  static emReturnType EndService();//服务器退出的时候,调用该函数关闭服务  //Client  以下函数是客户端调用  static emReturnType Logon(LOGONINFO* pLogonInfo);//函数登录服务器。pLogonInfo:登录信息,详细见P2PHeaderDef.h->LOGONINFO  static emReturnType Logout();//登出服务器  static emReturnType ConnectAnchor(CLIENTINFO* pClientInfo);//连接主播,该函数是用户调用  static emReturnType SendP2PMSG(CLIENTINFO* pClientInfo, char* pszMsg, int nMsgLen);//发送P2P消息,pClientInfo,要发送的客户信息,如果是用户,则pClientI
    2022-02-03 19:54:38下载
    积分:1
  • Java网络演示,用于北京师范大学计算机系Java课教学示范。...
    Java网络编程演示,用于北京师范大学计算机系Java课程教学示范。-Java Network Programming demonstration for the Computer Science Department of Beijing Normal University Teaching Java model.
    2022-01-26 15:32:30下载
    积分:1
  • 代理类的实现例子
    代理类的实现例子-example of the realization category
    2022-02-04 07:58:57下载
    积分:1
  • access remote machines physical address
    c#获得远程机器物理地址-access remote machines physical address
    2023-05-13 18:45:02下载
    积分:1
  • 枚举系统中所有进,及他们的所有网络连接
    枚举系统中所有进程,及他们的所有网络连接-Enumerate all the processes and all of their network connections
    2022-03-21 09:19:26下载
    积分:1
  • 一个有用的对等点的序,值得学习
    一个有用的P2P程序,值得学习-a useful P2P procedures, it is worth learning
    2022-02-01 13:33:27下载
    积分:1
  • 分析IP地址(DDX).
    分析IP地址(DDX).-analysis of the IP address (DDX).
    2022-04-08 15:56:39下载
    积分:1
  • delphi实现的一个断点续传的例子,支持多线下载
    delphi实现的一个断点续传的例子,支持多线程下载-achieve an HTTP example, supports multi-threaded download
    2022-02-02 05:56:08下载
    积分:1
  • 696518资源总数
  • 105877会员总数
  • 14今日下载