e股脑电脑教程网
  • 首 页
  • 操作系统
  • 应用软件
  • 下载工具
  • 影音视频
  • 办公软件
  • 媒体制作
  • 网站建设
  • 平面设计
  • 数据库
  • 程序开发
  • 视频教程
编辑推荐: | 文章搜索:
您现在的位置: e股脑 >> 程序开发 >> ASP.net教程 >> C++/CLI程序进程之间的通讯 >> 教程正文
 
教程搜索
 
 
相关教程
  • C++/CLI实战——HELLO
  • VC编写简单的序列号(SN)填写器
  • Visual Studio 2005体验泛型编程
  • C++/CLI基本数据类型探索
  • 用托管C++编写Windows服务
  • Visual C++ 2005图像编程之属性设置栏
  • Visual C++ 2005图像编程之工具栏
  • Visual C++ 2005图像编程之预备知识
  • 把其他C/C++编译器集成到VC2005中
  • VC.NET实现清爽便利的Windows游戏窗口
  • C++:最强大的.NET语言之可访问性
  • C++:最强大的.NET语言之装箱
  • C++:最强大的.NET语言之内存与资源
  • C++:最强大的.NET语言之对象构造
  • Visual C++2005中开发自定义绘图控件
  • C++/CLI程序进程之间的通讯
 
 

图文教程


  • Windows抢了谁的饭碗 非主流操作系统To

  • 地球还是火星 平常心看“非主流”

  • 综合运用Office 2007批量制作奖状

  • 没有系统盘如何才能修复受损系统?

  • 巧妙运用Excel中边界的附加功能!
 
 
赞 助 商
 
 
C++/CLI程序进程之间的通讯
  • 来源:e股脑
  • 点击次数:
  • 更新时间:2007-8-9
1、 如果一个服务端连接队列已满,那对新的客户端连接请求来说,会发生什么呢?

2、 如果当客户端还有一个打开的套接字,而服务端此时却关闭了,会发生什么呢?反之呢?

3、 试着运行一个服务端和两个客户端。我们前面说过,服务端只能处理一个客户端,为使服务端能同时处理多个客户端,需要进行多线程设计,建议对服务端作一些适当的修改,并用两个、三个、或更多客户端来测试。

4、 以下是当有两个客户端运行时的输出:

Client 2600 4

Sent values 56 and 35, received result 91

Sent values 48 and 20, received result 68

Sent values 6 and 97, received result 103


Sent values 76 and 9, received result 85

Notified server we're shutting down

Shutting down client

Client 2600 2

Sent values 69 and 66, received result 135

Sent values 84 and 45, received result 129

Notified server we're shutting down

Shutting down client

Server 2600

Waiting for new connection request

New connection accepted

Started thread Thread-1

Waiting for new connection request

Executing thread Thread-1

Received values 56 and 35, sent result 91

New connection accepted

Started thread Thread-2

Waiting for new connection request

Executing thread Thread-2

Received values 69 and 66, sent result 135

Received values 48 and 20, sent result 68

Received values 84 and 45, sent result 129

Received values 6 and 97, sent result 103

Shutting down server thread Thread-2

Received values 76 and 9, sent result 85

Shutting down server thread Thread-1


上一页  1 2 3 
  • 上一篇教程: Visual C++ 2005中的突破性变化
  • 下一篇教程: Visual C++2005中开发自定义绘图控件
  •  

    关于本站 | 广告联系 | 版权声明 | 使用帮助

    Copyright © 2004-2008 www.egunao.com All rights reserved.