pub async fn connect(
        context: &Context,
        bind_addr: &ManagerAddr,
        connect_opts: &ConnectOpts,
    ) -> io::Result<Self> {
        match *bind_addr {
            ManagerAddr::SocketAddr(sa) => Self::connect_socket_addr(sa, connect_opts).await,

            ManagerAddr::DomainName(ref dname, port) => {
                // Try connect to all socket addresses
                lookup_then!(context, dname, port, |addr| {
                    Self::connect_socket_addr(addr, connect_opts).await
                })
                .map(|(_, d)| d)
            }

            #[cfg(unix)]
            // For unix socket, it doesn't need to bind to any valid address
            // Because manager won't response to you
            ManagerAddr::UnixSocketAddr(ref path) => {
                let dgram = UnixDatagram::unbound()?;
                dgram.connect(path)?;
                Ok(Self::UnixDatagram(dgram))
            }
        }
    }
Create a `ManagerDatagram` for sending data to manager
crates/shadowsocks/src/manager/datagram.rs