message: network-grpc: Add function server::listen_unix
  This is analogous to listen(), but for Unix sockets.
  The stream of incoming connection sockets can be fed to the
  newly generic Server::serve.
diff: @@ -8,8 +8,14 @@ use tokio::{
  runtime::current_thread::TaskExecutor,
  };
  +#[cfg(unix)]
  +use tokio::net::{UnixListener, UnixStream};
  +
  use std::{error::Error as ErrorTrait, fmt, net::SocketAddr};
  +#[cfg(unix)]
  +use std::path::Path;
  +
  /// The gRPC server for the blockchain node.
  ///
  /// This type encapsulates the gRPC protocol server providing the
  @@ -101,6 +107,17 @@ pub fn listen(
  Ok(stream)
  }
  +/// Sets up a listening Unix socket bound to the specified path.
  +/// If successful, returns an asynchronous stream of `UnixStream` socket
  +/// objects representing accepted connections from clients.
  +#[cfg(unix)]
  +pub fn listen_unix<P: AsRef<Path>>(
  + path: P,
  +) -> Result<impl Stream<Item = UnixStream, Error = tokio::io::Error>, tokio::io::Error> {
  + let listener = UnixListener::bind(path)?;
  + Ok(listener.incoming())
  +}
  +
  /// The error type for gRPC server operations.
  #[derive(Debug)]
  pub enum Error {
  