-
Notifications
You must be signed in to change notification settings - Fork 10
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
BIO Stream can work with any IO (not just TCPSocket) #27
base: main
Are you sure you want to change the base?
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
@@ -420,7 +326,7 @@ macro geterror(ssl, op, expr) | |||
esc(quote | |||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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