forked from ryzokuken/cosmoline
Compare commits
2 Commits
1b2333922f
...
3195de3d5f
Author | SHA1 | Date |
---|---|---|
mirsal | 3195de3d5f | |
mirsal | 458ff680ec |
|
@ -1,6 +1,7 @@
|
|||
use clap::{load_yaml, App};
|
||||
use ed25519_dalek::Keypair;
|
||||
|
||||
use async_std::fs;
|
||||
use async_std::net::UdpSocket;
|
||||
use async_std::path::PathBuf;
|
||||
|
||||
|
@ -44,7 +45,7 @@ async fn main() -> std::io::Result<()> {
|
|||
.join("cosmoline")
|
||||
.join("config.toml")),
|
||||
};
|
||||
let config = async_std::fs::read_to_string(config_file).await?;
|
||||
let config = fs::read_to_string(config_file).await?;
|
||||
let config: Config = toml::from_str(config.as_str()).unwrap();
|
||||
|
||||
let path = match options.value_of("path") {
|
||||
|
@ -57,7 +58,7 @@ async fn main() -> std::io::Result<()> {
|
|||
let keypair = Keypair::read_or_generate(path.join("secret")).await;
|
||||
println!("{}", keypair.to_json().pretty(2));
|
||||
|
||||
let socket = UdpSocket::bind(":::8008").await?;
|
||||
let socket = UdpSocket::bind("0.0.0.0:8008").await?;
|
||||
let mut buf = [0u8; 1024];
|
||||
|
||||
loop {
|
||||
|
|
Loading…
Reference in New Issue