#include <QtCore/QCoreApplication>
#include <QtNetwork/QLocalSocket>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QLocalSocket client(&a);

    qDebug("QLocalSocket::connectToServer()");
    client.connectToServer("test_localsocket");

    qDebug("QLocalSocket::waitForConnected()");
    if (client.waitForConnected(-1) == true)
    {
        qDebug("QLocalSocket::waitForDisconnected()");
        client.waitForDisconnected(-1);
        return 0;
    }

    return 1;
}
