Skip to content

Commit

Permalink
use 127.0.0.1 instead of localhost for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
birkenfeld committed Nov 9, 2024
1 parent 2972212 commit fd2d5d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ads::notif::{Attributes, TransmissionMode};
use ads::{Client, Source, Timeouts};

fn main() {
let client = Client::new(("localhost", ads::PORT), Timeouts::none(), Source::Request).unwrap();
let client = Client::new(("127.0.0.1", ads::PORT), Timeouts::none(), Source::Request).unwrap();
let recv_notify = client.get_notification_channel();
std::thread::spawn(move || {
for msg in recv_notify.iter() {
Expand Down
2 changes: 1 addition & 1 deletion examples/values_via_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct Motor {
}

fn main() {
let client = Client::new(("localhost", ads::PORT), Timeouts::none(), Source::Request).unwrap();
let client = Client::new(("127.0.0.1", ads::PORT), Timeouts::none(), Source::Request).unwrap();
let dev = client.device(ads::AmsAddr::new([5, 62, 215, 36, 1, 1].into(), 851));
let handle = Handle::new(dev, "MY_SYMBOL").unwrap();
let motor = handle.read_value::<Motor>().unwrap();
Expand Down

0 comments on commit fd2d5d1

Please sign in to comment.