Skip to content

Instantly share code, notes, and snippets.

@denysonique
Created August 30, 2011 15:34
Show Gist options
  • Select an option

  • Save denysonique/1181186 to your computer and use it in GitHub Desktop.

Select an option

Save denysonique/1181186 to your computer and use it in GitHub Desktop.
#include <QtNetwork>
#include <QtGui>
#include "server.h"
#include <QObject>
#include <QMessageBox>
Server::Server(QMainWindow *window)
{
tcpServer = new QTcpServer();
if(!tcpServer->listen()) {
QMessageBox::critical(window, tr("Server", "Unable to start server %1.")
.arg(tcpServer->errorString()));
}
close();
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment