diff options
author | Maria Matejka <mq@ucw.cz> | 2023-04-20 21:06:42 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-22 20:48:42 +0200 |
commit | b3f805ce29487f790090fcf31096f5a7cf1d585d (patch) | |
tree | 5391762ee46af090a2ca5bb0d5674c66a8aab04e /lib | |
parent | 074739e0e9baaba53f2a99edd348b76c3613b455 (diff) |
Socket closing has its dedicated function
Diffstat (limited to 'lib')
-rw-r--r-- | lib/socket.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/socket.h b/lib/socket.h index 4b169581..6225977b 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -88,6 +88,7 @@ sock *sock_new(pool *); /* Allocate new socket */ int sk_open(sock *, struct birdloop *); /* Open socket */ void sk_reloop(sock *, struct birdloop *); /* Move socket to another loop. Both loops must be locked. */ +static inline void sk_close(sock *s) { rfree(&s->r); } /* Explicitly close socket */ int sk_rx_ready(sock *s); _Bool sk_tx_pending(sock *s); |