struct OpenSSL::GETS_BIO
- OpenSSL::GETS_BIO
- Struct
- Value
- Object
Defined in:
openssl_ext/bio.crConstant Summary
-
GETS_BIO =
begin crystal_bio = OpenSSL::BIO::CRYSTAL_BIO crystal_bio.bgets = LibCrypto::BioMethodGets.new do |bio, buffer, len| io = Box(IO).unbox(bio.value.ptr) io.flush position = io.pos line = io.gets(len, false) if line.nil? return 0 end io.seek(position) bytes = (io.read(Slice.new(buffer, line.bytesize))).to_i bytes - 1 end crystal_bio end