revert connect fn to init
This commit is contained in:
parent
81e329b40e
commit
d2a0c38f68
12
src/sbot.rs
12
src/sbot.rs
|
@ -39,13 +39,7 @@ impl Sbot {
|
|||
/// Initiate a connection with an sbot instance. Define the IP address,
|
||||
/// port and network key for the sbot, then retrieve the public key,
|
||||
/// private key (secret) and identity from the `.ssb-go/secret` file.
|
||||
/// Open a TCP stream to the sbot and perform the secret handshake. If
|
||||
/// successful, create a box stream and split it into a writer and reader.
|
||||
/// Return RPC handles to the sbot as part of the `struct` output.
|
||||
pub async fn connect(
|
||||
ip_port: Option<String>,
|
||||
net_id: Option<String>,
|
||||
) -> Result<Sbot, GolgiError> {
|
||||
pub async fn init(ip_port: Option<String>, net_id: Option<String>) -> Result<Sbot, GolgiError> {
|
||||
let address = if ip_port.is_none() {
|
||||
"127.0.0.1:8008".to_string()
|
||||
} else {
|
||||
|
@ -85,6 +79,10 @@ impl Sbot {
|
|||
|
||||
/// Private helper function which creates a new connection with sbot,
|
||||
/// but with all variables passed as arguments.
|
||||
///
|
||||
/// Open a TCP stream to the sbot and perform the secret handshake. If
|
||||
/// successful, create a box stream and split it into a writer and reader.
|
||||
/// Return RPC handles to the sbot as part of the `struct` output.
|
||||
async fn _get_sbot_connection_helper(
|
||||
address: String,
|
||||
network_id: auth::Key,
|
||||
|
|
Loading…
Reference in New Issue