aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/netif
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-02-22 19:34:19 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-02-22 19:48:36 +0100
commitf27fdf89dc52799e7c908493da2c9ccdf7b1d3c4 (patch)
tree0cf55fc47cb2eb129e36c6f33edae07193144247 /include/osmocom/netif
parent2cbaf4139ae768ff5a79c79d389045b4ef4dd0e6 (diff)
add support for flushing and destroying a server-side stream
Introduce osmo_stream_srv_set_flush_and_destroy() which marks a stream to be 'flushed and destroyed'. No new messages will be received on this stream, and no new messages can be queued. Once the Tx queue has been drained, the connection is destroyed. The API user is given a chance to perform cleanup operations in the closed_cb() callback for the connection. The same mechanism will be added for client-side connections in a follow-up patch. Change-Id: I8ed78fe39c463e9018756700d13ee5ebe003b57f Related: OS#2789 Suggested-by: Harald Welte
Diffstat (limited to 'include/osmocom/netif')
-rw-r--r--include/osmocom/netif/stream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 4e1beb6..166ede2 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -41,6 +41,7 @@ struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv *
struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv);
void osmo_stream_srv_destroy(struct osmo_stream_srv *conn);
+void osmo_stream_srv_set_flush_and_destroy(struct osmo_stream_srv *conn);
void osmo_stream_srv_set_data(struct osmo_stream_srv *conn, void *data);
void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg);