Skip to content

Commit 2d393fd

Browse files
authored
feat: add access to underlying config (#103)
1 parent 710cf25 commit 2d393fd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib.rs

+10
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ impl TlsConnector {
153153
session,
154154
}))
155155
}
156+
157+
/// Get a read-only reference to underlying config
158+
pub fn config(&self) -> &Arc<ClientConfig> {
159+
&self.inner
160+
}
156161
}
157162

158163
impl TlsAcceptor {
@@ -188,6 +193,11 @@ impl TlsAcceptor {
188193
state: TlsState::Stream,
189194
}))
190195
}
196+
197+
/// Get a read-only reference to underlying config
198+
pub fn config(&self) -> &Arc<ServerConfig> {
199+
&self.inner
200+
}
191201
}
192202

193203
pub struct LazyConfigAcceptor<IO> {

0 commit comments

Comments
 (0)