Skip to content
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

pass part echo CI in windows #248

Merged
merged 8 commits into from
Mar 18, 2024

Conversation

loongs-zhang
Copy link
Contributor

No description provided.

let error = unsafe { WSAGetLastError() };
return Err(std::io::Error::from_raw_os_error(error));
Err(io::Error::from_raw_os_error(error))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails in here, got a WSAEFAULT, but I think there should be no problem with the pointers. Could you please provide some help? @ihciah

&mut bytes_recved,
std::ptr::null_mut(),
&mut bytes_received,
&mut 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lpFlags here is used as both in and out. So it has to be able to read and write.
Have you tried to implement it like rust std? In std impl, it declare 2 temp variable nread and flags, and then pass the mut references.

https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/windows/net.rs#L253

Copy link
Contributor Author

@loongs-zhang loongs-zhang Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is equivalent.
image

Still blocked in monoio/tests/tcp_echo.rs:45

@loongs-zhang loongs-zhang reopened this Mar 16, 2024
@loongs-zhang loongs-zhang reopened this Mar 16, 2024
@loongs-zhang loongs-zhang reopened this Mar 16, 2024
@loongs-zhang loongs-zhang changed the title try fix echo_server pass part echo CI in windows Mar 17, 2024
@ihciah ihciah merged commit 4b9a125 into bytedance:master Mar 18, 2024
72 of 76 checks passed
@loongs-zhang loongs-zhang deleted the dev-try-fix-echo-CI branch March 18, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants