#[cfg(unix)]
mod unix;
#[cfg(windows)]
mod windows;

#[cfg(unix)]
pub(crate) use unix::{PlatformListener, PlatformStream};

#[cfg(windows)]
pub(crate) use windows::{PlatformListener, PlatformStream};

use crate::Result;

pub(crate) async fn create_listener(socket_path: &str) -> Result<PlatformListener> {
    #[cfg(unix)]
    {
        unix::create_listener(socket_path).await
    }
    #[cfg(windows)]
    {
        windows::create_listener(socket_path).await
    }
}
