diff options
Diffstat (limited to 'tests/pollfd.c')
| -rw-r--r-- | tests/pollfd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/pollfd.c b/tests/pollfd.c index 2eca7248..0c93c365 100644 --- a/tests/pollfd.c +++ b/tests/pollfd.c @@ -58,13 +58,13 @@ TestMain("Poll FDs", { size_t sz; sz = sizeof(fd); - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); So(fd != (int) INVALID_SOCKET); Convey("And it is always the same fd", { int fd2; sz = sizeof(fd2); - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd2, &sz) == + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd2, &sz) == 0); So(fd2 == fd); }); @@ -96,7 +96,7 @@ TestMain("Poll FDs", { size_t sz; sz = sizeof(fd); - So(nng_getopt(s1, NNG_OPT_SENDFD, &fd, &sz) == 0); + So(nng_socket_get(s1, NNG_OPT_SENDFD, &fd, &sz) == 0); So(fd != (int) INVALID_SOCKET); So(nng_send(s1, "oops", 4, 0) == 0); }); @@ -105,10 +105,10 @@ TestMain("Poll FDs", { int fd; size_t sz; sz = 1; - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd, &sz) == NNG_EINVAL); sz = 128; - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); So(sz == sizeof(fd)); }); }); @@ -118,7 +118,7 @@ TestMain("Poll FDs", { int fd; So(nng_pull0_open(&s3) == 0); Reset({ nng_close(s3); }); - So(nng_getopt_int(s3, NNG_OPT_SENDFD, &fd) == NNG_ENOTSUP); + So(nng_socket_get_int(s3, NNG_OPT_SENDFD, &fd) == NNG_ENOTSUP); }); Convey("We cannot get a recv FD for PUSH", { @@ -126,6 +126,6 @@ TestMain("Poll FDs", { int fd; So(nng_push0_open(&s3) == 0); Reset({ nng_close(s3); }); - So(nng_getopt_int(s3, NNG_OPT_RECVFD, &fd) == NNG_ENOTSUP); + So(nng_socket_get_int(s3, NNG_OPT_RECVFD, &fd) == NNG_ENOTSUP); }); }) |
