找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 3661|回复: 1

问一个ace example 中Proactor文件传输的问题

[复制链接]
发表于 2008-7-13 22:44:37 | 显示全部楼层 |阅读模式
ace自带的例子,在examples\Reactor\Proactor目录下的Proactor_Proactor例子,
为什么它会将一个文件传输两次
我用的是下面的参数:
客户端 :-h 127.0.0.1 -p 6000
服务器端:-p 6000
最后的该目录下的output文件是原来需要传输的文件(testProactor.cpp)的两倍。
请大侠指教,谢谢了。
补充:
原来的例子会报错:ACE_OS::open:Unknown Error
所以我将test_proactor.cpp中第96行
this->dump_file_ = ACE_OS::open (dump_file,
                                   O_CREAT | O_RDWR | O_TRUNC | FILE_FLAG_OVERLAPPED,
                                   0644);
改为
this->dump_file_ = ACE_OS::open (dump_file,
                                   O_CREAT | O_RDWR | O_TRUNC | FILE_FLAG_OVERLAPPED,
                                   ACE_DEFAULT_OPEN_PERMS);
操作系统版本:winxp
ace版本:5.5
现在没什么问题了,自己没看懂程序,呵呵
 楼主| 发表于 2008-7-13 22:44:46 | 显示全部楼层
Interesting, 0644 is common for *nix. It would be supprising if ACE
could handle it correctly for all win32 platforms. Are you using XP
home? Higher XP version might work. I think they should fix "0644"
anyway.
您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-5-10 00:23 , Processed in 0.012010 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表