简体   繁体   中英

Is it correct to close TCP connection directly - without closing more high-level layer?

For example I communicate with SMS center throgh smpp protocol, and SMSC send to me FIN flag by tcp protocol instead of sending unbind throgh SMPP. Is it correct?

The unbind operation is optional, besides, it's usually sent by the ESME to the MC, not vice versa.

Even if the MC usually sends unbind before connection close, there might be cases where it cannot do that (for example it detects some protocol error, thus cannot reliably send an unbind operation). In these cases the MC will just close the connection, so in your client you should handle the "naked close" case, too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM