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

tx.send_to(&[0u8], None) fail #659

Open
yunfengwangluo opened this issue Nov 9, 2023 · 0 comments
Open

tx.send_to(&[0u8], None) fail #659

yunfengwangluo opened this issue Nov 9, 2023 · 0 comments

Comments

@yunfengwangluo
Copy link

let (mut tx, mut rx) = match datalink::channel(&selected_interface, Default::default()) { Ok(datalink::Channel::Ethernet(tx, rx)) => (tx, rx), Ok(_) => panic!("未处理的通道类型"), Err(e) => panic!("创建通道失败: {}", e), }; tx.send_to(&[0u8], None).unwrap().unwrap();
called Result::unwrap() on an Err value: Os { code: 21, kind: Uncategorized, message: "设备未就绪。" }

Thank you for wasting your valuable time looking at my question. Thank you again!

According to the description of this function, the second parameter is currently ignored and should be used as' None ', but I encountered the above error after doing so. I don't know if there is a problem with my usage!

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

No branches or pull requests

1 participant