KNET_LIN...NG_TIMERS(3)

✨ KNET_LIN...NG_TIMERS(3) ✨

okay bestie, welcome to the Kronosnet Programmer's Manual πŸ’– you're reading knet_link_set_ping_timers(3) and honestly? it's giving "I control the heartbeat of your link" energy. sit down, grab a boba, let's get into it πŸ§‹


πŸ’« NAME πŸ’«

knet_link_set_ping_timers β€” Set the ping timers for a link.

like, you're literally telling a link how often to say "u up?" and how long to wait before deciding the other side ghosted you πŸ’€


🌸 SYNOPSIS 🌸

#include <libknet.h>

int knet_link_set_ping_timers(
    knet_handle_t   knet_h,
    knet_node_id_t  host_id,
    uint8_t         link_id,
    time_t          interval,
    time_t          timeout,
    unsigned int    precision
);

πŸ¦‹ DESCRIPTION πŸ¦‹

knet_link_set_ping_timers β€” no cap, this is the one that sets your ping vibes ✨

  • knet_h β€” pointer to knet_handle_t πŸ’…
  • host_id β€” see knet_host_add(3) πŸ‘‘
  • link_id β€” see knet_link_set_config(3) πŸ”—
  • interval β€” specify the ping interval in milliseconds ⏱️
  • timeout β€” if no pong is received within this time, the link is declared dead, in milliseconds. NOTE: in future it will be possible to set timeout to 0 for an autocalculated timeout based on interval, pong_count and latency. The API already accept 0 as value and it will return ENOSYS / -1. Once the automatic calculation feature will be implemented, this call will only return EINVAL for incorrect values. 🚨 so rn, 0 is NOT the glow-up you think it is, bestie β€” it just errors out.
  • precision β€” how many values of latency are used to calculate the average link latency (see also knet_link_get_status(3)) πŸ“Š

πŸŽ€ RETURN VALUE πŸŽ€

knet_link_set_ping_timers returns 0 on success, -1 on error and errno is set.

slay when it's 0, 😭 when it's -1, and that's the whole vibe check.


🌈 SEE ALSO 🌈

bestie the friend group is HUGE, here's the whole crew fr fr 🫢


Copyright (C) 2010-2026 Red Hat, Inc. All rights reserved.


and that's the whole page, bestie 🫢 this little icon dropped as part of the kronosnet manual, dated 2026-07-20, and yes the page name really is KNET_LIN...NG_TIMERS(3) β€” the dots are doing their own thing and we respect the aesthetic ✨ go set some timers, you main character πŸ‘‘

πŸ“¦ where this page comes from