usock: implement usock_inet_timeout() with RFC6555 support Signed-off-by: Felix Fietkau <nbd@openwrt.org>
usock: add usock_inet, which returns the remote address Signed-off-by: Felix Fietkau <nbd@openwrt.org>
usock: add helper waiting for socket to be ready Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
usock: add usock_port() for convenient use of numeric ports Add a new helper function usock_port() which converts the given numeric port number into a string using a private static buffer. This way a calling application can conveniently use numeric port arguments without having to convert them before: int fd = usock(USOCK_UDP, "example.org", usock_port(80)); Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
usock: fix indentation Signed-off-by: Luka Perkov <luka@openwrt.org>
add license headers for usock Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Initial import