blob: c209da5ba9fe8cdbe5d2364f1aa20822eba05af1 (
plain) (
tree)
|
|
use anyhow::{Result, Context};
use log::*;
use crate::*;
pub struct DiplonatContext {
pub config: config::DiplonatConfig,
pub gateway: igd::aio::Gateway
}
pub async fn setup() -> Result<DiplonatContext> {
let ctx = DiplonatContext {
config: config::load_env().context("Unable to read configuration from environment")?,
gateway: gw::get_gateway().await?
};
return Ok(ctx);
}
pub fn listen() -> bool {
return true;
}
|