QDBusServer Class

QDBusServer 클래스는 동일한 컴퓨터의 프로세스 간에 피어 투 피어 통신을 제공합니다. 더 보기...

헤더: #include <QDBusServer>
CMake: find_package(Qt6 REQUIRED COMPONENTS DBus)
target_link_libraries(mytarget PRIVATE Qt6::DBus)
qmake: QT += dbus
상속합니다: QObject

공용 함수

QDBusServer(QObject *parent = nullptr)
QDBusServer(const QString &address, QObject *parent = nullptr)
virtual ~QDBusServer()
QString address() const
bool isAnonymousAuthenticationAllowed() const
bool isConnected() const
QDBusError lastError() const
void setAnonymousAuthenticationAllowed(bool value)

시그널

void newConnection(const QDBusConnection &connection)

상세 설명

멤버 함수 문서

[explicit] QDBusServer::QDBusServer(QObject *parent = nullptr)

주어진 parent 으로 QDBusServer를 구축합니다. 서버는 /tmp (유닉스 시스템의 경우) 또는 localhost에 바인딩된 TCP 포트(그 외의 경우)에서 연결을 수신 대기합니다.

[explicit] QDBusServer::QDBusServer(const QString &address, QObject *parent = nullptr)

주어진 address 과 주어진 parent 을 사용하여 QDBusServer를 구축합니다.

[virtual noexcept] QDBusServer::~QDBusServer()

를 파괴합니다. QDBusServer

QString QDBusServer::address() const

이 서버가 연결된 주소를 반환합니다.

bool QDBusServer::isAnonymousAuthenticationAllowed() const

익명 인증이 허용되면 true를 반환합니다.

setAnonymousAuthenticationAllowed()도 참조하세요 .

bool QDBusServer::isConnected() const

QDBusServer 객체가 연결되면 true 을 반환합니다.

연결되지 않은 경우 생성자를 다시 호출해야 합니다.

QDBusError QDBusServer::lastError() const

이 서버에서 마지막으로 발생한 오류를 반환합니다.

이 함수는 로우레벨 코드에 제공됩니다.

[signal] void QDBusServer::newConnection(const QDBusConnection &connection)

이 신호는 서버에 새 클라이언트 연결( connection )이 설정될 때 발생합니다.

void QDBusServer::setAnonymousAuthenticationAllowed(bool value)

value 을 true로 설정하면 연결 클라이언트가 사용자로 인증되지 않은 경우에도 수신 연결을 진행할 수 있습니다.

기본적으로 이 값은 false입니다.

isAnonymousAuthenticationAllowed()도 참조하세요 .

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.