void
CTCPListenSocket::close()
{
    if (m_socket == NULL) {
        throw XIOClosed();
    }
    try {
        ARCH->closeSocket(m_socket);
        m_socket = NULL;
    }
    catch (XArchNetwork& e) {
        throw XSocketIOClose(e.what());
    }
}
Example #2
0
void
CTCPListenSocket::close()
{
	CLock lock(m_mutex);
	if (m_socket == NULL) {
		throw XIOClosed();
	}
	try {
		CSocketMultiplexer::getInstance()->removeSocket(this);
		ARCH->closeSocket(m_socket);
		m_socket = NULL;
	}
	catch (XArchNetwork& e) {
		throw XSocketIOClose(e.what());
	}
}