MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetBindAddresses

Function GetBindAddresses

src/network/network.cpp:719–729  ·  view source on GitHub ↗

* Get the addresses to bind to. * @param addresses the list to write to. * @param port the port to bind to. */

Source from the content-addressed store, hash-verified

717 * @param port the port to bind to.
718 */
719void GetBindAddresses(NetworkAddressList *addresses, uint16_t port)
720{
721 for (const auto &iter : _network_bind_list) {
722 addresses->emplace_back(iter, port);
723 }
724
725 /* No address, so bind to everything. */
726 if (addresses->empty()) {
727 addresses->emplace_back("", port);
728 }
729}
730
731/* Generates the list of manually added hosts from NetworkGame and
732 * dumps them into the array _network_host_list. This array is needed

Callers 2

NetworkUDPInitializeFunction · 0.85
ListenMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected