struct OpenSSL::GETS_BIO

Defined in:

openssl_ext/bio.cr

Constant 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

Constructors

Instance Method Summary

Constructor Detail

def self.new(io : IO) #

[View source]

Instance Method Detail

def io : IO #

[View source]
def to_unsafe #

[View source]