Skip to content

Commit

Permalink
Add FFI stubs to support reconnect and setDns
Browse files Browse the repository at this point in the history
  • Loading branch information
jamilbk committed Mar 17, 2024
1 parent 2dc5cd5 commit 10860a5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rust/connlib/clients/apple/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ mod ffi {
callback_handler: CallbackHandler,
) -> Result<WrappedSession, String>;

fn reconnect(&mut self);
#[swift_bridge(swift_name = "setDns")]
fn set_dns(&mut self, dns_servers: String);
fn disconnect(self);
}

Expand Down Expand Up @@ -211,6 +214,16 @@ impl WrappedSession {
})
}

fn reconnect(&mut self) {
tracing::debug!("Reconnecting");
// self.inner.reconnect()
}

fn set_dns(&mut self, dns_servers: String) {
tracing::debug!("Setting DNS servers: {}", dns_servers);
// self.inner.set_dns(dns_servers)
}

fn disconnect(self) {
self.inner.disconnect()
}
Expand Down

0 comments on commit 10860a5

Please sign in to comment.