Пример #1
0
    NetUI::NetUI(const QString & host, const qint16 & port, QObject * parent) :
        QObject(parent) {
        _dataServer = new QTcpServer(this);

        fetchConnections();

        if (!_dataServer->listen(QHostAddress(host), port)) {
            qDebug() << "server hasn't started, continue without it";
        }
    }
Пример #2
0
// Retrieve the best edge to follow in the cycle joining phase
int Graph::getNextEdge(int edgeIndex, int toNode)
{
	updateCycle(edgeIndex, toNode);
	std::vector<int> connections = fetchConnections(toNode, edgeIndex);
	return selectEdge(connections);	
}