mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 06:26:15 +01:00
Add adapter_close to stop TCP stack
This commit is contained in:
@@ -53,6 +53,14 @@ class Adapter {
|
||||
return Ok(ReadWrite::adopt(s));
|
||||
}
|
||||
|
||||
Result<void, FfiError> close() {
|
||||
FfiError e(::adapter_close(handle_.get()));
|
||||
if (e) {
|
||||
return Err(e);
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
private:
|
||||
explicit Adapter(AdapterHandle* h) noexcept : handle_(h) {}
|
||||
AdapterPtr handle_{};
|
||||
|
||||
Reference in New Issue
Block a user