diff options
author | liuyacan <liuyacan@corp.netease.com> | 2021-05-09 03:50:40 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2021-05-12 04:45:07 +0000 |
commit | 534468e9f768ae7465ef722520dadfd916cdc9fb (patch) | |
tree | 7433d66e807340a2b5e0abbe152b6b944f32675d /src/vnet/session/transport.c | |
parent | 7b2917fbe2a9ec17f69ca94fcbae534927915834 (diff) |
session: support half-close connection
Some app(e.g. Envoy) may call shutdown() instead of close() when
draining connection.
Type: improvement
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I9543b9ca3caa87b10b134fd1fc4019124e41e4d2
Diffstat (limited to 'src/vnet/session/transport.c')
-rw-r--r-- | src/vnet/session/transport.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c index 18ae3ca5188..2c88a4c4931 100644 --- a/src/vnet/session/transport.c +++ b/src/vnet/session/transport.c @@ -318,6 +318,13 @@ transport_connect (transport_proto_t tp, transport_endpoint_cfg_t * tep) } void +transport_half_close (transport_proto_t tp, u32 conn_index, u8 thread_index) +{ + if (tp_vfts[tp].half_close) + tp_vfts[tp].half_close (conn_index, thread_index); +} + +void transport_close (transport_proto_t tp, u32 conn_index, u8 thread_index) { tp_vfts[tp].close (conn_index, thread_index); |