diff options
author | David Robillard <d@drobilla.net> | 2014-12-18 08:33:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-18 08:33:08 +0000 |
commit | 4b0ac1dfa4a03099f59dc07c2d97e06be2bf2651 (patch) | |
tree | 20e484a6ccccc5896b48827a137b3c658efd370c /test/socket_test.cpp | |
parent | d9a5e2143fa88e29cd3cf873d3da63798a99dde2 (diff) | |
download | raul-4b0ac1dfa4a03099f59dc07c2d97e06be2bf2651.tar.gz raul-4b0ac1dfa4a03099f59dc07c2d97e06be2bf2651.tar.bz2 raul-4b0ac1dfa4a03099f59dc07c2d97e06be2bf2651.zip |
Fix socket test on OSX and print error messages.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@5500 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test/socket_test.cpp')
-rw-r--r-- | test/socket_test.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/socket_test.cpp b/test/socket_test.cpp index 5c7ffae..4547e8b 100644 --- a/test/socket_test.cpp +++ b/test/socket_test.cpp @@ -28,21 +28,25 @@ int main(int argc, char** argv) { Raul::URI unix_uri("unix:///tmp/raul_test_sock"); - Raul::URI tcp_uri("tcp://localhost:12345"); + Raul::URI tcp_uri("tcp://127.0.0.1:12345"); Raul::Socket unix_server_sock(Socket::Type::UNIX); Raul::Socket tcp_server_sock(Socket::Type::TCP); if (!unix_server_sock.bind(unix_uri)) { - fprintf(stderr, "Failed to bind UNIX server socket\n"); + fprintf(stderr, "Failed to bind UNIX server socket (%s)\n", + strerror(errno)); return 1; } else if (!unix_server_sock.listen()) { - fprintf(stderr, "Failed to listen on UNIX server socket\n"); + fprintf(stderr, "Failed to listen on UNIX server socket (%s)\n", + strerror(errno)); return 1; } else if (!tcp_server_sock.bind(tcp_uri)) { - fprintf(stderr, "Failed to bind TCP server socket\n"); + fprintf(stderr, "Failed to bind TCP server socket (%s)\n", + strerror(errno)); return 1; } else if (!tcp_server_sock.listen()) { - fprintf(stderr, "Failed to listen on TCP server socket\n"); + fprintf(stderr, "Failed to listen on TCP server socket (%s)\n", + strerror(errno)); return 1; } |