Example #1
0
void Sesion::iniciarServidor()
{
    if(!servidor->listen(QHostAddress::Any,6901)){
        qDebug()<<"SERVIDOR : Error al iniciar ...";
        exit(0);
    } else {
        connect(servidor,SIGNAL(newConnection()),this,SLOT(nuevoCliente()));
        qDebug()<<"SERVIDOR : Esperando clientes";
    }
}
Example #2
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    this->setWindowTitle("Acopio Riback");
    this->setWindowState(Qt::WindowMaximized);


    connect (ui->actionOfrecidos , SIGNAL (triggered()), this, SLOT(showOfrecidos()));
    connect (ui->actionCompras , SIGNAL (triggered()), this, SLOT(showCompras()));
    connect (ui->actionVentas , SIGNAL (triggered()), this, SLOT(showVentas()));
    connect (ui->actionNuevoCliente , SIGNAL (triggered()), this, SLOT(nuevoCliente()));
    connect (ui->actionListado_clientes , SIGNAL (triggered()), this, SLOT(listadoClientes()));
    connect (ui->actionNuega_Carga , SIGNAL (triggered()), this, SLOT(nuevaCarga()));
    connect (ui->actionListado_Cargas , SIGNAL (triggered()), this, SLOT(listadoCargas()));
    connect (ui->actionEn_deposito , SIGNAL (triggered()), this, SLOT(listadoCargasDeposito()));
    connect (ui->actionPendientes , SIGNAL (triggered()), this, SLOT(listadoCargasPendientes()));
}
Example #3
0
void comprobarClientesNuevos(int socketServidor) {
	if (FD_ISSET (socketServidor, &descriptoresLectura))
		nuevoCliente(socketServidor);
}