how to clean boost::asio::ssl::stream after closed by server

╄→尐↘猪︶ㄣ 提交于 2019-12-13 17:56:26

问题


Currently I am developing a gateway to connect apns to push notification. Apns will close the ssl socket when the connection is idle for about one hour. Sometimes when I reconnect, boost.asio keep telling me that handshake fail with error code 335544539. When apns close the connection, I will call socket.close(), but I didn't shutdown ssl stream. How could I clean ssl stream so that I could reconnect by using the old ssl stream?

来源:https://stackoverflow.com/questions/25263381/how-to-clean-boostasiosslstream-after-closed-by-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!