mirror of
https://github.com/tezc/sc.git
synced 2025-01-28 07:03:06 +08:00
connect test
This commit is contained in:
parent
488f63265a
commit
3a211cce08
@ -1040,6 +1040,13 @@ void sock_fail_test()
|
||||
fail_fcntl = INT32_MAX;
|
||||
sc_sock_term(&sock);
|
||||
|
||||
sc_sock_init(&sock, 0, true, SC_SOCK_INET);
|
||||
fail_fcntl = 1;
|
||||
assert(sc_sock_connect(&sock, "127.0.0.1", "8080", NULL, NULL) == -1);
|
||||
assert(sc_sock_set_blocking(&sock, true) == -1);
|
||||
fail_fcntl = INT32_MAX;
|
||||
sc_sock_term(&sock);
|
||||
|
||||
sc_sock_init(&sock, 0, true, SC_SOCK_INET);
|
||||
fail_fcntl = 1;
|
||||
assert(sc_sock_listen(&sock, "127.0.0.1", "8080") == -1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user