src/qt/paymentserver.cpp
bool PaymentServer::ipcSendCommandLine()
{
    bool fResult = false;
    foreach (const QString& r, savedPaymentRequests)
    {
        QLocalSocket* socket = new QLocalSocket();
        socket->connectToServer(ipcServerName(), QIODevice::WriteOnly);
        if (!socket->waitForConnected(BITCOIN_IPC_CONNECT_TIMEOUT))
        {
            delete socket;
            socket = NULL;
            return false;
        }

        QByteArray block;
        QDataStream out(&block, QIODevice::WriteOnly);
        out.setVersion(QDataStream::Qt_4_0);
        out << r;
        out.device()->seek(0);

        socket->write(block);
        socket->flush();
        socket->waitForBytesWritten(BITCOIN_IPC_CONNECT_TIMEOUT);
        socket->disconnectFromServer();

        delete socket;
        socket = NULL;
        fResult = true;
    }

    return fResult;
}
//
// Sending to the server is done synchronously, at startup.
// If the server isn't already running, startup continues,
// and the items in savedPaymentRequest will be handled
// when uiReady() is called.
//
Sending to the server is done synchronously, at startup.
If the server isn't already running, startup continues,
and the items in savedPaymentRequest will be handled
when uiReady() is called.
Sending to the server is done synchronously at startup . If the server isn ' t already running startup continues and the items in savedPaymentRequest will be handled when uiReady () is called .
bool PaymentServer::ipcSendCommandLine()
{
    bool fResult = false;
    foreach (const QString& r, savedPaymentRequests)
    {
        QLocalSocket* socket = new QLocalSocket();
        socket->connectToServer(ipcServerName(), QIODevice::WriteOnly);
        if (!socket->waitForConnected(BITCOIN_IPC_CONNECT_TIMEOUT))
        {
            delete socket;
            socket = NULL;
            return false;
        }
        QByteArray block;
        QDataStream out(&block, QIODevice::WriteOnly);
        out.setVersion(QDataStream::Qt_4_0);
        out << r;
        out.device()->seek(0);
        socket->write(block);
        socket->flush();
        socket->waitForBytesWritten(BITCOIN_IPC_CONNECT_TIMEOUT);
        socket->disconnectFromServer();
        delete socket;
        socket = NULL;
        fResult = true;
    }
    return fResult;
}
bool PaymentServer :: ipcSendCommandLine ( ) { bool fResult = false ; foreach ( const QString & r , savedPaymentRequests ) { QLocalSocket * socket = new QLocalSocket ( ) ; socket -> connectToServer ( ipcServerName ( ) , QIODevice :: WriteOnly ) ; if ( ! socket -> waitForConnected ( BITCOIN_IPC_CONNECT_TIMEOUT ) ) { delete socket ; socket = NULL ; return false ; } QByteArray block ; QDataStream out ( & block , QIODevice :: WriteOnly ) ; out . setVersion ( QDataStream :: Qt_4_0 ) ; out << r ; out . device ( ) -> seek ( 0 ) ; socket -> write ( block ) ; socket -> flush ( ) ; socket -> waitForBytesWritten ( BITCOIN_IPC_CONNECT_TIMEOUT ) ; socket -> disconnectFromServer ( ) ; delete socket ; socket = NULL ; fResult = true ; } return fResult ; }
Sending to the server is done synchronously, at startup.
Sending to the server is done synchronously at startup .