-pub async fn connect_tcp(tcp: impl ToSocketAddrs) -> Result<SignalCliClient, RpcError> {
- super::tcp::connect::<_, SignalCliClient>(tcp).await
+pub async fn connect_tcp(tcp: impl ToSocketAddrs) -> Result<impl SubscriptionClientT, Error> {
+ let (sender, receiver) = super::transports::tcp::connect(tcp).await?;
+
+ Ok(ClientBuilder::default().build_with_tokio(sender, receiver))
+}
+
+pub async fn connect_unix(
+ socket_path: impl AsRef<Path>,
+) -> Result<impl SubscriptionClientT, Error> {
+ let (sender, receiver) = super::transports::ipc::connect(socket_path).await?;
+
+ Ok(ClientBuilder::default().build_with_tokio(sender, receiver))