diff tests/ordinary.rs @ 4:66c0e10c89fc

Support resolving hostnames Until now the crate supported only IP addresses and systemd sockets. This was troublesome because it prevented the popular `localhost:1234` format. This commit changes the behavior so that if parsing of `std::net::SocketAddr` fails it attempts to parse it as `hostname:port`. `bind_*()` methods were also modified to be async because of this.
author Martin Habovstiak <martin.habovstiak@gmail.com>
date Fri, 27 Nov 2020 15:05:19 +0100
parents ef8bf41097ac
children cfef4593e207
line wrap: on
line diff
--- a/tests/ordinary.rs	Fri Nov 27 12:56:37 2020 +0100
+++ b/tests/ordinary.rs	Fri Nov 27 15:05:19 2020 +0100
@@ -7,7 +7,7 @@
 enum Test {}
 
 impl comm::Test for Test {
-    const SOCKET_ADDR: &'static str = "127.0.0.1:4242";
+    const SOCKET_ADDR: &'static str = "localhost:4242";
 
     fn spawn_slave(program_name: &OsStr) -> io::Result<Child> {
         Command::new(program_name)