SITL: Make socket more verbose

This commit is contained in:
Pierre Kancir 2016-11-21 14:39:13 +01:00 committed by Andrew Tridgell
parent 567a8d68e5
commit 5b8c89225a
2 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,7 @@ void SITL_State::_sitl_setup(const char *home_str)
fg_socket.connect("127.0.0.1", _fg_view_port);
}
fprintf(stdout, "Using Irlock at port : %d\n", _irlock_port);
_sitl->irlock_port = _irlock_port;
}

View File

@ -422,6 +422,7 @@ void Aircraft::set_interface_ports(const char* address, const int port_in, const
fprintf(stderr, "Abording launch...\n");
exit(1);
}
printf("Bind %s:%d for SITL in\n", "127.0.0.1", port_in);
socket_in.reuseaddress();
socket_in.set_blocking(false);
@ -430,6 +431,7 @@ void Aircraft::set_interface_ports(const char* address, const int port_in, const
fprintf(stderr, "Abording launch...\n");
exit(1);
}
printf("Bind %s:%d for SITL out\n", address, port_out);
socket_out.reuseaddress();
socket_out.set_blocking(false);
}