简体   繁体   English

是什么导致升压 C++ asio 中的 asio.misc.3 错误

[英]What causes asio.misc.3 error in boost C++ asio

I am asking this question because I could not find the answer on stack overflow but have answered it myself so hope some future poor soul can benefit.我问这个问题是因为我找不到堆栈溢出的答案,但我自己回答了,所以希望未来的一些可怜的灵魂能受益。

The context of the problem is when using boost::asio::async_read_until which reads until it encounters a specific string specified in the call.问题的上下文是在使用 boost::asio::async_read_until 时读取,直到遇到调用中指定的特定字符串。 In my vase it was a "/n"在我的花瓶里是“/n”

It turns out that the test server that was writing to the socket missed appending "/n" to the records.事实证明,正在写入套接字的测试服务器错过了将“/n”附加到记录中。 So the error asio.misc.3 means "Not found" which you can find in the boost source code but it was not immediately obvious what it meant.所以错误 asio.misc.3 的意思是“未找到”,您可以在 boost 源代码中找到它,但它的含义并不是很明显。 Obvious in retrospect, of course.当然,回想起来很明显。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM