ObjFW  Diff

Differences From Artifact [72b93f58cf]:

To Artifact [00380c738c]:


604
605
606
607
608
609
610













604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623







+
+
+
+
+
+
+
+
+
+
+
+
+
	case OF_SOCKET_ADDRESS_FAMILY_IPV6:
		address->sockaddr.in6.sin6_port = OF_BSWAP16_IF_LE(port);
		break;
	default:
		@throw [OFInvalidArgumentException exception];
	}
}

uint16_t
of_socket_address_get_port(const of_socket_address_t *address)
{
	switch (address->family) {
	case OF_SOCKET_ADDRESS_FAMILY_IPV4:
		return OF_BSWAP16_IF_LE(address->sockaddr.in.sin_port);
	case OF_SOCKET_ADDRESS_FAMILY_IPV6:
		return OF_BSWAP16_IF_LE(address->sockaddr.in6.sin6_port);
	default:
		@throw [OFInvalidArgumentException exception];
	}
}