File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,11 @@ impl TcpSocket {
424
424
self . inner . local_addr ( ) . and_then ( convert_address)
425
425
}
426
426
427
+ /// Returns the value of the `SO_ERROR` option.
428
+ pub fn take_error ( & self ) -> io:: Result < Option < io:: Error > > {
429
+ self . inner . take_error ( )
430
+ }
431
+
427
432
/// Binds the socket to the given address.
428
433
///
429
434
/// This calls the `bind(2)` operating-system function. Behavior is
Original file line number Diff line number Diff line change @@ -264,6 +264,11 @@ impl TcpStream {
264
264
self . io . local_addr ( )
265
265
}
266
266
267
+ /// Returns the value of the `SO_ERROR` option.
268
+ pub fn take_error ( & self ) -> io:: Result < Option < io:: Error > > {
269
+ self . io . take_error ( )
270
+ }
271
+
267
272
/// Returns the remote address that this stream is connected to.
268
273
///
269
274
/// # Examples
You can’t perform that action at this time.
0 commit comments