Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions s2energy-connection/examples/pairing-server.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
use axum_server::tls_rustls::RustlsConfig;
use rustls::pki_types::{CertificateDer, pem::PemObject};
use std::{net::SocketAddr, path::PathBuf, sync::Arc};
use uuid::uuid;

use s2energy_connection::{
MessageVersion, S2NodeDescription, S2Role,
MessageVersion, S2EndpointDescription, S2NodeDescription, S2Role,
pairing::{NodeConfig, PairingS2NodeId, PairingToken, Server, ServerConfig},
};
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
Expand All @@ -19,7 +18,11 @@ async fn main() {
.with(EnvFilter::from_default_env())
.init();

let server = Server::new(ServerConfig { root_certificate: None });
let server = Server::new(ServerConfig {
root_certificate: None,
advertised_endpoint: S2EndpointDescription::default(),
advertised_nodes: vec![],
});
let config = NodeConfig::builder(
S2NodeDescription {
id: uuid!("67e55044-10b1-426f-9247-bb680e5fe0c8").into(),
Expand Down
Loading
Loading