net: fix non-blocking read/write#20438
Conversation
|
Why I can't see the full log of FreeBSD Code CI ? |
See it here: https://cirrus-ci.com/task/4822104995004416 (it is linked at the bottom of the CI check page). |
|
I can test this later this afternoon on FreeBSD and Alpine without ipv6 and comment. I would like to avoid the call to set_blocking(true) if possible and have it be blocking by default. |
|
If the default behaviour is changed from non-blocking to blocking sockets it should add |
TcpSocket is still non-blocking default. Because vweb call .accept_only(), it should add conn.set_blocking(true) manually . |
7f144ca to
a768db8
Compare
|
(rebased over master, should solve FreeBSD failure) |
|
I think this patch is done.... |
e6a7cba to
2a77e5a
Compare
Co-authored-by: Delyan Angelov <delian66@gmail.com>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
Adding set_blocking(true) to net.dial_tcp(), net.dial_tcp_with_bind(), net.accept().
This will ensure that the upper net apps do not need to modify.
For non-blocking usage, after create a TCPConn via net.dial_tcp(), net.dial_tcp_with_bind(), net.accept(), should use set_blocking(false) change to non-blocking mode.
Both blocking/non-blocking apps can use the same read/write now.