make AtemSocket{,Inner} take a socketaddr at init time
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::time::Duration;
|
||||
use std::{env::args, net::Ipv4Addr, time::Duration};
|
||||
|
||||
use atem_connection_rs::{
|
||||
atem_lib::atem_socket::AtemSocket,
|
||||
@@ -18,8 +18,11 @@ async fn main() {
|
||||
let switch_to_source_1 = ProgramInput::new(0, 1);
|
||||
let switch_to_source_2 = ProgramInput::new(0, 2);
|
||||
|
||||
let mut atem = AtemSocket::new();
|
||||
atem.connect("127.0.0.1".to_string(), 9910).await.ok();
|
||||
let mut atem = AtemSocket::new((
|
||||
args().skip(1).next().unwrap().parse::<Ipv4Addr>().unwrap(),
|
||||
9910,
|
||||
));
|
||||
atem.connect().await.ok();
|
||||
|
||||
let mut tracking_id = 0;
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user