Changeset View
Changeset View
Standalone View
Standalone View
src/server/aklocalserver.cpp
Show All 25 Lines | |||||
26 | { | 26 | { | ||
27 | } | 27 | } | ||
28 | 28 | | |||
29 | void AkLocalServer::incomingConnection(quintptr socketDescriptor) | 29 | void AkLocalServer::incomingConnection(quintptr socketDescriptor) | ||
30 | { | 30 | { | ||
31 | Q_EMIT newConnection(socketDescriptor); | 31 | Q_EMIT newConnection(socketDescriptor); | ||
32 | } | 32 | } | ||
33 | 33 | | |||
34 | #ifdef Q_OS_FREEBSD | ||||
35 | extern void adjustSocketBuffer( int real_fd ); | ||||
36 | | ||||
37 | bool AkLocalServer::listen( const QString& name ) | ||||
38 | { | ||||
39 | qDebug() << "listen" << name; | ||||
40 | bool r = QLocalServer::listen(name); | ||||
41 | if (r) | ||||
42 | { | ||||
43 | qintptr fd = -1; // QLocalServer::socketDescriptor(); // new in Qt 5.10 | ||||
44 | int real_fd = static_cast<int>(fd); | ||||
45 | if ((fd != -1) && (real_fd >= 0)) | ||||
46 | { | ||||
47 | adjustSocketBuffer( real_fd ); | ||||
48 | } | ||||
49 | else | ||||
50 | qDebug() << "AkLocalServer No socket descriptor." << fd << real_fd; | ||||
51 | } | ||||
52 | return r; | ||||
53 | } | ||||
54 | #endif |