bio.cpp 857 B

1234567891011121314151617181920212223242526272829
  1. #include "bio.h"
  2. namespace NOpenSSL {
  3. TBioMethod::TBioMethod(
  4. int type,
  5. const char* name,
  6. int (*write)(BIO*, const char*, int),
  7. int (*read)(BIO*, char*, int),
  8. int (*puts)(BIO*, const char*),
  9. int (*gets)(BIO*, char*, int),
  10. long (*ctrl)(BIO*, int, long, void*),
  11. int (*create)(BIO*),
  12. int (*destroy)(BIO*),
  13. long (*callbackCtrl)(BIO*, int, bio_info_cb*)
  14. )
  15. : THolder(type, name)
  16. {
  17. BIO_meth_set_write(*this, write);
  18. BIO_meth_set_read(*this, read);
  19. BIO_meth_set_puts(*this, puts);
  20. BIO_meth_set_gets(*this, gets);
  21. BIO_meth_set_ctrl(*this, ctrl);
  22. BIO_meth_set_create(*this, create);
  23. BIO_meth_set_destroy(*this, destroy);
  24. BIO_meth_set_callback_ctrl(*this, callbackCtrl);
  25. }
  26. } // namespace NOpenSSL