summaryrefslogtreecommitdiff
path: root/lib/socket.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-05-31 13:21:07 +0000
committerMartin Mares <mj@ucw.cz>1999-05-31 13:21:07 +0000
commit139ca21d05df71b59a72af126d063170421cf9f7 (patch)
tree54140a62b661971a5668ae6096e6125514097b28 /lib/socket.h
parentfd5f8704bb7c2e9845a7c4785ace83a2b77d2c57 (diff)
Added sk_send_buffer_empty().
Diffstat (limited to 'lib/socket.h')
-rw-r--r--lib/socket.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/socket.h b/lib/socket.h
index bb9c1c3d..e6229f70 100644
--- a/lib/socket.h
+++ b/lib/socket.h
@@ -46,6 +46,12 @@ int sk_send(sock *, unsigned len); /* Send data, <0=err, >0=ok, 0=sleep */
int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to given destination */
void sk_dump_all(void);
+static inline int
+sk_send_buffer_empty(sock *sk)
+{
+ return sk->tbuf == sk->tpos;
+}
+
/*
* Socket types SA SP DA DP IF TTL SendTo (?=may, -=must not, *=must)
*/