Ejemplo n.º 1
0
void TelnetServer::onClientComplete(TcpClient& client, bool succesfull)
{
    if ( &client == curClient)
    {
        delete commandExecutor;
        commandExecutor = nullptr;
        curClient = nullptr;
        debugf("TelnetServer onClientComplete %s", client.getRemoteIp().toString().c_str() );
    }
    else
    {
        debugf("Telnet server unconnected client close");
    }

    debugf("TelnetServer onClientComplete %s", client.getRemoteIp().toString().c_str() );
    TcpServer::onClientComplete(client, succesfull);
}
Ejemplo n.º 2
0
void TcpServer::onClientComplete(TcpClient& client, bool succesfull)
{
	activeClients--;
	debugf("TcpSever onComplete : %s activeClients = %d\r\n",client.getRemoteIp().toString().c_str(),activeClients );
	if (clientCompleteDelegate)
	{
		clientCompleteDelegate(client,succesfull);
	}
}
Ejemplo n.º 3
0
bool TcpServer::onClientReceive (TcpClient& client, char *data, int size)
{
	debugf("TcpSever onReceive : %s, %d bytes \r\n",client.getRemoteIp().toString().c_str(),size );
	debugf("Data : %s", data);
	if (clientReceiveDelegate)
	{
		return clientReceiveDelegate(client, data, size);
	}
	return true;
}
Ejemplo n.º 4
0
bool TelnetServer::onClientReceive (TcpClient& client, char *data, int size)
{
    debugf("TelnetServer onClientReceive : %s, %d bytes \r\n",client.getRemoteIp().toString().c_str(),size );
    debugf("Data : %s", data);
    if (commandExecutor)
    {
        commandExecutor->executorReceive(data,size);
    }

    return true;
}
Ejemplo n.º 5
0
bool tcpServerClientReceive (TcpClient& client, char *data, int size)
{
	debugf("Application DataCallback : %s, %d bytes \r\n",client.getRemoteIp().toString().c_str(),size );
	debugf("Data : %s", data);
	client.sendString("sendString data\r\n", false);
	client.writeString("writeString data\r\n",0 );
	if (strcmp(data,"close") == 0)
	{
		debugf("Closing client");
		client.close();
	};
	return true;
}
Ejemplo n.º 6
0
void tcpServerClientComplete(TcpClient& client, bool succesfull)
{
	debugf("Application CompleteCallback : %s \r\n",client.getRemoteIp().toString().c_str() );
}