-
Notifications
You must be signed in to change notification settings - Fork 213
socket-datagram #39
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
socket-datagram #39
Conversation
delete debug print run cargo clippy
Pull Request Test Coverage Report for Build 107314994
💛 - Coveralls |
| const SOCKET_CONTROL_READABLE = 1 << 6; | ||
| const SOCKET_CONTROL_WRITABLE = 1 << 7; | ||
| const SCOEKT_ACCEPT = 1 << 8; | ||
| const SOCKET_SHARE = 1 << 9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reorder them between 5 and 10
| let _peer = self.peer.upgrade().ok_or(ZxError::PEER_CLOSED)?; | ||
| if inner.read_disabled { | ||
| /// Write data to the socket. | ||
| pub fn write(&self, options: SocketFlags, data: &[u8], count: usize) -> ZxResult<usize> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count is unnecessary, it's equal to data.len()
zircon-object/src/ipc/socket.rs
Outdated
| } | ||
| } | ||
|
|
||
| pub fn write_control(&self, data: &[u8], count: usize) -> ZxResult<usize> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove pub for internal functions
|
And don't forget to run |
cargo fmt and clippy
Pull Request Test Coverage Report for Build 106667640Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
add datagram for socket, set capacity limit for socket.
pass almost all core-tests, two of which failed due to a bug of vmar