Chinaunix首页 | 论坛 | 博客
  • 博客访问: 576529
  • 博文数量: 226
  • 博客积分: 10080
  • 博客等级: 上将
  • 技术积分: 1725
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-26 11:15
文章分类

全部博文(226)

文章存档

2011年(5)

2010年(64)

2009年(99)

2008年(37)

2007年(21)

我的朋友

分类:

2008-07-11 17:35:09

   前几天遇到gSOAP服务器报错,
 报这个错“End of file or no input: 'Operation interrupted or timed out' ,Error Detail : ”
 查gSOAP文档是因为时间超时所致,采取的解决办法报超时时间设置为0 即永远不超时即可
Example:

struct soap soap;
soap_init(&soap);
soap.send_timeout = 10;
soap.recv_timeout = 10;

This will result in a timeout if no data can be send in 10 seconds and no data is received within 10 seconds after initiating a send or receive operation over the socket. A value of zero disables timeout, for example:

soap.send_timeout = 0;
soap.recv_timeout = 0;

When a timeout occurs in send/receive operations, a SOAP_EOF exception will be raised ("end of file or no input"). Negative timeout values measure timeouts in microseconds, for example:

#define uSec *-1
#define mSec *-1000
soap.accept_timeout = 10 uSec;
soap.send_timeout = 20 mSec;
soap.recv_timeout = 20 mSec;

The macros improve readability.
Caution: Many Linux versions do not support non-blocking connect(). Therefore, setting soap.connect_timeout for non-blocking soap_call_ns__method calls may not work under Linux.
 
 
 
阅读(4194) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-08-23 17:25:14

最近研究gsoap,对我上面问的问题又有了新的理解,欢迎有对gsoap感兴趣的朋友一起研究探讨!

chinaunix网友2008-08-14 15:33:02

你好 我最近正在研究gsoap写服务器端方面的问题 服务器端设的endpoint好像不起作用?我的httpd服务器并不支持CGI,我如何在这个服务器里添加gsoap服务器接口?谢谢!我msn:qj-qiujian@sohu.com