Overhauled SSL to use explicit BIO buffers

This commit is contained in:
2023-02-24 17:47:13 -05:00
parent 98c1b2d599
commit 596e39add8
6 changed files with 293 additions and 165 deletions

View File

@@ -505,12 +505,13 @@ void DrivenEngine::drv_sent_outgoing(uint32_t chid, uint32_t nbytes) {
}
void DrivenEngine::drv_recv_incoming(uint32_t chid, uint32_t nbytes, const char *bytes) {
std::string_view sbytes(bytes, nbytes);
if (nbytes > 0) {
Channel *ch = get_chid(chid);
if (ch->sb_drvout_ != ch->sb_out_) {
ch->feed_readline(bytes);
ch->feed_readline(sbytes);
} else {
ch->sb_in_->write_bytes(bytes);
ch->sb_in_->write_bytes(sbytes);
}
}
}

View File

@@ -77,7 +77,7 @@ public:
//
const eng::string &target() const { return target_; }
// True if the remote closed the connection, or a failure occurred.
// True if the remote has closed the connection.
//
bool closed() const { return closed_; }