Skip to content

Commit

Permalink
feat: unsplit
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Nov 14, 2023
1 parent 322f1ad commit d757cc8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,11 @@ pub struct TlsStreamRead {
}

impl TlsStreamRead {
/// Reunites with a previously split `TlsStreamWrite`.
pub fn unsplit(self, other: TlsStreamWrite) -> TlsStream {
self.r.unsplit(other.w)
}

/// Returns the peer address of this socket.
pub fn peer_addr(&self) -> Result<std::net::SocketAddr, io::Error> {
let Some(tcp) = &self.tcp else {
Expand Down

0 comments on commit d757cc8

Please sign in to comment.