MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / address_t

Method address_t

src/dpp/socket.cpp:29–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace dpp {
28
29address_t::address_t(const std::string_view ip, uint16_t port) {
30 sockaddr_in address{};
31 address.sin_family = AF_INET;
32 address.sin_port = htons(port);
33 address.sin_addr.s_addr = inet_addr(ip.data());
34 std::memcpy(&socket_addr, &address, sizeof(address));
35}
36
37sockaddr* address_t::get_socket_address() {
38 return &socket_addr;

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected