BIO Stream can work with any IO (not just TCPSocket)#27
BIO Stream can work with any IO (not just TCPSocket)#27grlap wants to merge 17 commits intoJuliaWeb:mainfrom
Conversation
|
I restricted this to just TCPSocket because that's the only actual use I'm aware of and it helps w/ performance and avoiding a dynamic dispatch. Do you have a use-case other than tests where you're relying on using some other IO? |
|
Self signed cert. Also writing and reading from the socket is just ugly. |
… bytesavailable on_bio_stream_write return -1 if write fails (bss_sock.c) This enables server side mode, however the logic in the bio still does not match what OpenSSL is doing.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
==========================================
- Coverage 76.80% 76.54% -0.26%
==========================================
Files 2 2
Lines 1095 1113 +18
==========================================
+ Hits 841 852 +11
- Misses 254 261 +7 ☔ View full report in Codecov by Sentry. |
0d40e60 to
ee21d15
Compare
| # lock our SSLStream while we clear errors | ||
| # make a ccall, then check the error queue | ||
| Base.@lock ssl.lock begin | ||
| lock(ssl.lock) do |
There was a problem hiding this comment.
otherwise macro fails (only Julia 1.6.7 Windows)
Print OpenSSL object is also using BIOStream{T<:IO}
BIO_STREAM_CALLBACKS_TCPSOCKET.x = BIOStreamCallbacks{TCPSocket}()
|
@grlap any plan to merge this? :) |
|
I'm still waiting for sign off. |
on_bio_stream_read and on_bio_stream_write can use any IO (not just TCPSocket)
http server works fine