Lines Matching refs:bio
17 int stream_write(BIO* bio, const char* buf, int size) { in stream_write() argument
18 brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr); in stream_write()
20 BIO_clear_retry_flags(bio); in stream_write()
26 BIO_set_retry_write(bio); in stream_write()
32 int stream_read(BIO* bio, char* buf, int size) { in stream_read() argument
33 brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr); in stream_read()
35 BIO_clear_retry_flags(bio); in stream_read()
43 BIO_set_retry_read(bio); in stream_read()
50 long stream_ctrl(BIO* bio, int cmd, long /* num */, void* /* ptr */) { in stream_ctrl() argument
52 brillo::Stream* stream = static_cast<brillo::Stream*>(bio->ptr); in stream_ctrl()
58 int stream_new(BIO* bio) { in stream_new() argument
59 bio->shutdown = 0; // By default do not close underlying stream on shutdown. in stream_new()
60 bio->init = 0; in stream_new()
61 bio->num = -1; // not used. in stream_new()
65 int stream_free(BIO* bio) { in stream_free() argument
66 if (!bio) in stream_free()
69 if (bio->init) { in stream_free()
70 bio->ptr = nullptr; in stream_free()
71 bio->init = 0; in stream_free()
93 BIO* bio = BIO_new(&stream_method); in BIO_new_stream() local
94 if (bio) { in BIO_new_stream()
95 bio->ptr = stream; in BIO_new_stream()
96 bio->init = 1; in BIO_new_stream()
98 return bio; in BIO_new_stream()