-
-
Notifications
You must be signed in to change notification settings - Fork 722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDP Server程序,在有的系统中tb_socket_urecv会一直返回0 #215
Comments
Title: UDP Server program, in some systems tb_socket_urecv will always return 0 The tbox version is the latest version 1.7.3, the development platform is Visual Studio 2017, and the computer is Windows 7_64bit. Like the Demo program that comes with tbox, a UDP Server program is written using the coroutine API to simply receive data. |
没遇到过,你可以跟下源码。。 |
Never encountered, you can follow the source code. . |
这个问题我跟进源码也没看出来原因。 |
I followed up the source code and didn't see the reason for this problem. |
xmake.lua 配置有改动,或者 xmake project 生成 vs 工程时候,都会触发重新配置。。 不建议在 vs 里面直接构建 tbox。。走 xmake 编译后,xmake install -o 导出库和头文件使用。。或者走 add_requires 包管理 |
When the xmake.lua configuration is changed, or when the xmake project generates a vs project, reconfiguration will be triggered. . |
这两个情况我是知道的,但是在我这里我没有再改动过xmake.lua,也没有重新生成VS工程,建好解决方案后只使用VS菜单中的“生成解决方案”、“清理解决方案”等操作,感觉应该和这些操作无关;
我后来用的就是“xmake install -o 导出库和头文件使用”这种方法,好使。 |
|
tbox版本是最新版1.7.3,开发平台是Visual Studio 2017,电脑是Windows 7_64bit,仿照tbox自带的Demo程序,使用协程API编写了一个UDP Server程序,只是单纯的接收数据。
最初一切正常,但是重装了系统(还是Windows 7_64bit)后,就出现无法收到数据的问题,断点跟进去发现tb_socket_urecv一直返回0。
换了台相同硬件配置的电脑,全新安装了Windows 10_64bit(版本号2022H2),情况一样,tb_socket_urecv一直返回0。但是在另外一台Windows10_64bit(版本号2020)上,同样的程序又能正常收数。再找一台不同硬件配置的电脑,安装Windows 10_64bit(版本号2022H2),tb_socket_urecv还是一直返回0。
所有电脑的驱动都安装齐全,没有病毒。用微软自家的Process Monitor监视程序进程的网络状态。是可以看到有UDP数据进来的。
不知道有没有遇到过类似情况?怎么定位的?怎么解决的?
谢谢!
The text was updated successfully, but these errors were encountered: