# Copyright (c) 2023 Yuki Kimoto
# MIT License

class Net::SSLeay::BIO : pointer {
  version_from Net::SSLeay;
  
  use Net::SSLeay::Error;
  
  # Class Methods
  native static method new : Net::SSLeay::BIO ();
  
  native static method new_file : Net::SSLeay::BIO ($filename : string, $mode : string);
  
  # Instance Methods
  native method read : int ($data : mutable string, $dlen : int = -1);
  
  native method write : int ($data : string, $dlen : int = -1);
  
  native method DESTROY : void ();
  
}