You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ipc_server.rs
    path of file: ./repos/eww/crates/eww/src
    
    the code of the file until where you have to start completion: use crate::{app, opts};
use anyhow::{Context, Result};
use std::time::Duration;
use tokio::{
    io::{AsyncReadExt, AsyncWriteExt},
    sync::mpsc::*,
};

pub async fn run_server<P: AsRef<std::path::Path>>(evt_send: UnboundedSender<app::DaemonCommand>, socket_path: P) -> Result<()> {
    let socket_path = socket_path.as_ref();
    let listener = { tokio::net::UnixListener::bind(socket_path)? };
    log::info!("IPC server initialized");
    crate::loop_select_exiting! {
        connection = listener.accept() => match connection {
            Ok((stream, _addr)) => {
                let evt_send = evt_send.clone();
                tokio::spawn(async move {
                    let result = handle_connection(stream, evt_send.clone()).await;
                    crate::print_result_err!("while handli
    
async fn handle_connection(mut stream: tokio::net::UnixStream, evt_send: UnboundedSender<app::DaemonCommand>) -> Result<()> {
    let (mut stream_read, mut stream_write) = stream.split();

    let action: opts::ActionWithServer = read_action_from_stream(&mut stream_read).await?;

    log::debug!("received command from IPC: {:?}", &action);

    let (command, maybe_response_recv) = action.into_daemon_command();

    evt_send.send(command)?;

    if let Some(mut response_recv) = maybe_response_recv {
        log::debug!("Waiting for response for IPC client");
        if let Ok(Some(response)) = tokio::time::timeout(Duration::from_millis(100), response_recv.recv()).await {
            let response = bincode::serialize(&response)?;
            let result = &stream_write.write_all(&response).await;
            crate::print_result_err!("sending text response to ipc client", &result);
        }
    }
    stream_write.shutdown().await?;
    Ok(())
}