use std::sync::Arc;
use async_trait::async_trait;
use tokio_util::sync::CancellationToken;
use tracing::info;
use super::super::error::AcpServerError;
use super::super::handler::AcpSessionHandler;
use super::Transport;
pub struct HttpTransport {
pub bind_address: String,
pub port: u16,
}
impl HttpTransport {
pub fn new(bind_address: impl Into<String>, port: u16) -> Self {
Self { bind_address: bind_address.into(), port }
}
}
#[async_trait]
impl Transport for HttpTransport {
async fn serve(
&self,
_handler: Arc<AcpSessionHandler>,
shutdown: CancellationToken,
) -> Result<(), AcpServerError> {
info!(
bind = %self.bind_address,
port = %self.port,
"HTTP transport started (stub — not fully implemented)"
);
shutdown.cancelled().await;
info!("HTTP transport shutting down");
Ok(())
}
}