Commit 1cbcfd23 authored by Bob Halley's avatar Bob Halley
Browse files

create socket with the right protocol family

parent af6d4475
......@@ -212,9 +212,6 @@ main(int argc, char *argv[]) {
result = isc_socketmgr_create(mctx, &socketmgr);
check_result(result, "isc_socketmgr_create()");
sock = NULL;
result = isc_socket_create(socketmgr, PF_INET, isc_sockettype_udp,
check_result(result, "isc_socket_create()");
server = "localhost";
port = 5544;
......@@ -297,6 +294,10 @@ main(int argc, char *argv[]) {
get_address(server, port, &sockaddr);
result = isc_socket_create(socketmgr, isc_sockaddr_pf(&sockaddr),
isc_sockettype_udp, &sock);
check_result(result, "isc_socket_create()");
isc_buffer_init(&b2, data2, sizeof data2, ISC_BUFFERTYPE_BINARY);
isc_buffer_available(&b2, &r);
result = isc_socket_recv(sock, &r, 1, task, recv_done, NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment