【发布时间】:2014-01-14 14:44:15
【问题描述】:
有可能吗?我知道自定义请求;所以我发送带有文本“DELE”的自定义请求,并设置我要删除的消息 ID。结果, curl_easy_perform 挂起,直到出现超时。在网络论坛上,人们写建议在“DELE”之后发送“QUIT”命令;但是如果 libcurl 挂起,如何发送“QUIT”命令?
libcurl 调试输出如下:
* Connected to pop-mail.outlook.com (157.55.1.215) port 995 (#2)
* SSL connection using DES-CBC3-SHA
* Server certificate:
* subject: C=US; ST=Washington; L=Redmond; O=Microsoft Corporation; CN=*.
hotmail.com
* start date: 2013-04-24 20:35:09 GMT
* expire date: 2016-04-24 20:35:09 GMT
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Organization Validation
CA - G2
* SSL certificate verify result: unable to get local issuer certificate (
20), continuing anyway.
< +OK DUB0-POP132 POP3 server ready
> CAPA
< -ERR unrecognized command
> USER ************@hotmail.com
< +OK password required
> PASS ******************
< +OK mailbox has 1 messages
> DELE 1
< +OK message deleted
* Operation too slow. Less than 1000 bytes/sec transferred the last 10 seconds
> QUIT
* Operation too slow. Less than 1000 bytes/sec transferred the last 10 seconds
* Closing connection 2
因此,消息被删除,但 libcurl 挂起,直到速度限制迫使它断开连接,这是个坏主意。删除消息后如何强制停止,不要等到超时?
【问题讨论】: