Commit graph

4 commits

Author SHA1 Message Date
Jo-Philipp Wich
fa73496098 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>
2014-09-23 12:01:00 +02:00
Felix Fietkau
f5245f9887 add license headers for usock
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-13 15:27:38 +01:00
Felix Fietkau
07dbea0058 usock: remove code duplication 2011-02-07 17:38:05 +01:00
Felix Fietkau
e82d74f898 Initial import 2010-10-13 21:29:08 +02:00