-
Notifications
You must be signed in to change notification settings - Fork 11
SockMan #64
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
SockMan #64
Conversation
|
Yo! There are two problems here:
Here is a patch: sv2sockman.diff.txt The changes to |
|
Thanks. I'll apply your changes as well as the test clarifications. |
53f852b to
d0ae2f6
Compare
|
Folded all of it into #50! Left a few followup questions there. Additionally I fixed a few locking warnings and implemented |
| * @param[in] buf Destination to write bytes to. | ||
| * @param[in] len Write up to this number of bytes. | ||
| * @param[in] flags Same as the flags of `recv(2)`. Just `MSG_PEEK` is honored. |
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.
@vasild these first two params are in/out right?
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.
Did you mean to comment on bitcoin#30988? This branch is stale (though not sure if this method changed since).
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.
#50 uses SockMan and I try to keep it freshly rebased.
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.
ok ill start tracking there, just had a few quesitons for @vasild as I'm consuming DynSock in my branch now too
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.
@vasild these first two params are in/out right?
The first one buf is an out yes, the method writes data to that. The second one is in - the method only reads it to know up to how many bytes it can write without overflowing. Noted in:
| std::unique_ptr<Sock> DynSock::Accept(sockaddr* addr, socklen_t* addr_len) const | ||
| { | ||
| return m_accept_sockets->Pop().value_or(nullptr); | ||
| } |
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.
@vasild would it make sense to modify sockaddr here like you do for ZeroSock::Accept()? Otherwise all client connections appear to originate from [::]:0
No description provided.