aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenauxg <19689618+Henauxg@users.noreply.github.com>2023-01-04 18:44:30 +0100
committergilles henaux <gill.henaux@gmail.com>2023-01-11 14:44:05 +0100
commitb1780d9772779fac554822e5a127614ed201a951 (patch)
treecfa603711973f1daa46abebe9ce98ff234f236f5
parentf9bf9a6ee0d8eea85b3bd39e7b5b267bb88122c1 (diff)
[exemples] Update open_connection usage in examples
-rw-r--r--examples/breakout/client.rs20
-rw-r--r--examples/chat/client.rs10
2 files changed, 17 insertions, 13 deletions
diff --git a/examples/breakout/client.rs b/examples/breakout/client.rs
index de59d00..6c1e5dd 100644
--- a/examples/breakout/client.rs
+++ b/examples/breakout/client.rs
@@ -91,15 +91,17 @@ struct WallBundle {
}
pub(crate) fn start_connection(mut client: ResMut<Client>) {
- client.open_connection(
- ConnectionConfiguration::new(
- SERVER_HOST.to_string(),
- SERVER_PORT,
- "0.0.0.0".to_string(),
- 0,
- ),
- CertificateVerificationMode::SkipVerification,
- );
+ client
+ .open_connection(
+ ConnectionConfiguration::new(
+ SERVER_HOST.to_string(),
+ SERVER_PORT,
+ "0.0.0.0".to_string(),
+ 0,
+ ),
+ CertificateVerificationMode::SkipVerification,
+ )
+ .unwrap();
}
fn spawn_paddle(commands: &mut Commands, position: &Vec3, owned: bool) -> Entity {
diff --git a/examples/chat/client.rs b/examples/chat/client.rs
index d9908ae..366a254 100644
--- a/examples/chat/client.rs
+++ b/examples/chat/client.rs
@@ -117,10 +117,12 @@ fn start_terminal_listener(mut commands: Commands) {
}
fn start_connection(mut client: ResMut<Client>) {
- client.open_connection(
- ConnectionConfiguration::new("127.0.0.1".to_string(), 6000, "0.0.0.0".to_string(), 0),
- CertificateVerificationMode::SkipVerification,
- );
+ client
+ .open_connection(
+ ConnectionConfiguration::new("127.0.0.1".to_string(), 6000, "0.0.0.0".to_string(), 0),
+ CertificateVerificationMode::SkipVerification,
+ )
+ .unwrap();
// You can already send message(s) even before being connected, they will be buffered. In this example we will wait for a ConnectionEvent.
}