前几天遇到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.
阅读(4284) | 评论(2) | 转发(0) |