Ejemplo n.º 1
0
bool DomoticzTCP::StopHardwareTCP()
{
	if (isConnected())
	{
		try {
			disconnectTCP();
		} catch(...)
		{
			//Don't throw from a Stop command
		}
	}
	else {
		try {
			if (m_thread)
			{
				m_stoprequested = true;
				m_thread->join();
			}
		}
		catch (...)
		{
			//Don't throw from a Stop command
		}
	}
	m_bIsStarted=false;
	return true;
}
Ejemplo n.º 2
0
int InetGSM::closemail()
{
     char end_c[2];
     end_c[0]=0x1a;
     end_c[1]='\0';

     gsm.SimpleWrite("\n.\n");
     gsm.SimpleWrite(end_c);
     disconnectTCP();
     return 1;
}