aboutsummaryrefslogtreecommitdiff
path: root/src/diplonat.rs
blob: 38b2f8ac6daa48a6dcbead935df8bb06cc282fb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use igd::Gateway;
use anyhow::{Result, Context};

use crate::*;

pub struct DiplonatContext {
  pub config: config::DiplonatConfig,
  //pub gateway: igd::Gateway
}

pub fn setup() -> Result<DiplonatContext> {
  return Ok(DiplonatContext {
    config: config::load_env().context("Unable to read configuration from environment")?,
    //gateway: search_gateway(Default::default()).await
  });
}

pub fn listen() -> bool {
  return true;
}