Change to new default port

This commit is contained in:
Dominik Nakamura 2022-01-30 00:04:30 +09:00
parent 4550724a70
commit 19c0c6042a
No known key found for this signature in database
GPG Key ID: E4C6A749B2491910
7 changed files with 7 additions and 7 deletions

View File

@ -48,7 +48,7 @@ use obws::Client;
#[tokio::main]
async fn main() -> Result<()> {
/// Connect to the OBS instance through obs-websocket.
let client = Client::connect("localhost", 4444, Some("password")).await?;
let client = Client::connect("localhost", 4455, Some("password")).await?;
/// Get and print out version information of OBS and obs-websocket.
let version = client.general().get_version().await?;

View File

@ -11,7 +11,7 @@ async fn main() -> Result<()> {
env::set_var("RUST_LOG", "obws=debug");
tracing_subscriber::fmt::init();
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
let client = Client::connect("localhost",4455, env::var("OBS_PASSWORD").ok()).await?;
let events = client.events()?;
pin_mut!(events);

View File

@ -10,7 +10,7 @@ async fn main() -> Result<()> {
env::set_var("RUST_LOG", "obws=debug");
tracing_subscriber::fmt::init();
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
let client = Client::connect("localhost", 4455, env::var("OBS_PASSWORD").ok()).await?;
let scene_list = client.scenes().get_scene_list().await?;

View File

@ -11,7 +11,7 @@ async fn main() -> Result<()> {
env::set_var("RUST_LOG", "obws=debug");
tracing_subscriber::fmt::init();
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
let client = Client::connect("localhost", 4455, env::var("OBS_PASSWORD").ok()).await?;
let screenshot = client
.sources()

View File

@ -10,7 +10,7 @@ async fn main() -> Result<()> {
env::set_var("RUST_LOG", "obws=debug");
tracing_subscriber::fmt::init();
let client = Client::connect("localhost", 4444, env::var("OBS_PASSWORD").ok()).await?;
let client = Client::connect("localhost", 4455, env::var("OBS_PASSWORD").ok()).await?;
let version = client.general().get_version().await?;
println!("{:#?}", version);

View File

@ -13,7 +13,7 @@
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! /// Connect to the OBS instance through obs-websocket.
//! let client = Client::connect("localhost", 4444, Some("password")).await?;
//! let client = Client::connect("localhost", 4455, Some("password")).await?;
//!
//! /// Get and print out version information of OBS and obs-websocket.
//! let version = client.general().get_version().await?;

View File

@ -31,7 +31,7 @@ pub async fn new_client() -> Result<Client> {
let host = env::var("OBS_HOST").unwrap_or_else(|_| "localhost".to_owned());
let port = env::var("OBS_PORT")
.map(|p| p.parse())
.unwrap_or(Ok(4444))?;
.unwrap_or(Ok(4455))?;
let client = Client::connect(host, port, env::var("OBS_PASSWORD").ok()).await?;
ensure_obs_setup(&client).await?;