* @param sslContext The SSL context for the client.
*/
TlsStream::TlsStream(const Socket::Ptr& socket, ConnectionRole role, const shared_ptr<SSL_CTX>& sslContext)
- : m_Socket(socket), m_Role(role)
+ : m_Eof(false), m_Socket(socket), m_Role(role)
{
std::ostringstream msgbuf;
char errbuf[120];
*/
void TlsStream::Close(void)
{
+ boost::mutex::scoped_lock alock(m_IOActionLock);
+
+ m_Eof = true;
+
for (int i = 0; i < 5; i++) {
int rc, err;
bool TlsStream::IsEof(void) const
{
- return (BIO_eof(m_BIO) == 1);
+ return m_Eof;
}