diff options
-rw-r--r-- | util.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -139,7 +139,8 @@ bind_socket(int socktype, const char *host, const char *port) hints.ai_family = AF_INET; hints.ai_socktype = socktype; - printf("bind to host: %s, port: %s\n", host, port); + printf("bind to host: %s, %s.port: %s\n", + host, socktype == SOCK_STREAM ? "tcp" : "udp", port); s = getaddrinfo(host, port, &hints, &result); if (s != 0) { @@ -186,7 +187,8 @@ connect_to_host(int socktype, const char *host, const char *port) hints.ai_family = AF_INET; hints.ai_socktype = socktype; - printf("connect to host: %s, port: %s\n", host, port); + printf("connect to host: %s, %s.port: %s\n", + host, socktype == SOCK_STREAM ? "tcp" : "udp", port); s = getaddrinfo(host, port, &hints, &result); if (s != 0) { |