Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QNX下编译找不到TCP_KEEPIDLE TCP_KEEPINTVL TCP_KEEPCNT #24

Open
thun-res opened this issue Jan 5, 2021 · 1 comment
Open

QNX下编译找不到TCP_KEEPIDLE TCP_KEEPINTVL TCP_KEEPCNT #24

thun-res opened this issue Jan 5, 2021 · 1 comment

Comments

@thun-res
Copy link

thun-res commented Jan 5, 2021

if (setsockopt(CastToSocket(socket), IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
    return false;
}

/* Send next probes after the specified interval. Note that we set the
 * delay as interval / 3, as we send three probes before detecting
 * an error (see the next setsockopt call). */
val = interval / count;
if (val == 0) val = 1;
if (setsockopt(CastToSocket(socket), IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) {
    return false;
}

/* Consider the socket in error state after three we send three ACK
 * probes without getting a reply. */
val = count;
if (setsockopt(CastToSocket(socket), IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) {
    return false;
}
@jeremyczhen
Copy link
Owner

jeremyczhen commented Jan 6, 2021

Sorry already fixed: for QNX -Dfdbus_QNX_KEEPALIVE=ON should be added to QNX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants