diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-05-09 15:53:22 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-05-09 15:53:22 +0200 |
commit | a19ae25a7d20d338243e2fef5a1fd45437701c2a (patch) | |
tree | 9d40a4c7a5af1726a60371af435cb391b2bb3c06 /src/diplonat.rs | |
parent | 643d6980e5c0f04928edf05219f735495e5589a5 (diff) | |
download | diplonat-a19ae25a7d20d338243e2fef5a1fd45437701c2a.tar.gz diplonat-a19ae25a7d20d338243e2fef5a1fd45437701c2a.zip |
Rewrite with modules, still in progress...
Diffstat (limited to 'src/diplonat.rs')
-rw-r--r-- | src/diplonat.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/diplonat.rs b/src/diplonat.rs new file mode 100644 index 0000000..44f6ac5 --- /dev/null +++ b/src/diplonat.rs @@ -0,0 +1,19 @@ +use igd::Gateway; + +use crate::*; + +pub struct DiplonatContext { + pub config: config::DiplonatConfig, + //pub gateway: igd::Gateway +} + +pub fn setup() -> Result<DiplonatContext, String> { + return Ok(DiplonatContext { + config: config::load_env()?, + //gateway: search_gateway(Default::default()).await + }); +} + +pub fn dloop() -> bool { + return true; +} |