While it's better to use a reliable transport like TLS with working close notify, it isn't always possible.