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); }
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); } }
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; }
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; }
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; }
void tcpServerClientComplete(TcpClient& client, bool succesfull) { debugf("Application CompleteCallback : %s \r\n",client.getRemoteIp().toString().c_str() ); }