I don’t know if it’s better, but to prove the concept that I had to do, I used the TCP socket on the Qt4 server and the Mono / C # client connected to it. Here is a sketch of my code:
MainWindow::mainWindow()
{
tcpServer = new QTcpServer(this);
tcpServer->listen(QHostAddress::Any,3333);
connect(tcpServer,SIGNAL(newConnection()),this,SLOT(on_new_serverConnection()));
}
void MainWindow::on_new_serverConnection()
{
connection = tcpServer->nextPendingConnection();
connect(connection, SIGNAL(readyRead()), this, SLOT(on_data_read()));
}
void MainWindow::on_data_read()
{
QString s = connection->readAll();
qDebug("file to load - %s", qPrintable(s));
}
Note: on_data_read()I will most likely get XML instead of the file name, since I need to get the commands as well. Other alternatives are shared memory, a unix socket (similar to this code), and if you want to go in: XMLRPC or SOAP or even dbus.
qt/examples/network/, qt/examples/dbus, qt/examples/ipc.