Questions tagged [qlocalserver]

The QLocalServer class provides a local socket based server

This class makes it possible to accept incoming local socket connections.

Link: https://deptinfo-ensip.univ-poitiers.fr/ENS/pyside-docs/PySide/QtNetwork/QLocalServer.html#

11 questions
3
votes
1 answer

QLocalServer won't start an incoming connection

I am creating a simple QSocketServer in Qt. The socket starts to listen, but the incomingConnection method never seems to run. Can someone explain what is wrong here? main: m_pipeserver = new PipeServer(this); if…
TSG
  • 4,242
  • 9
  • 61
  • 121
2
votes
1 answer

Problem with sending data to QLocalServer as a client before closing

I'm learning Qt and having some troubles with sending some data to QLocalServer before closing the client application. In the example i've tried to send "bye" twice. But on server side i've recieved it only once. No matter how many times client will…
pewpawpew
  • 31
  • 3
2
votes
0 answers

Creating a local socket in a custom location with Qt

I'm using QLocalServer to create a local socket so that other processes can connect to my Qt application. My problem is that Qt seems hellbent on creating the socket file in /tmp/, but I would prefer to follow XDG guidelines and use the…
1
vote
0 answers

Is it possible to get a PID out of a QLocalSocket connection?

I'm building a client/server architecture where a client process can connect to a server using local Unix domain sockets. The server process is implemented in Qt and uses QLocalServer and QLocalSocket to maintain the connection at the server end. Is…
1
vote
1 answer

Qt 5.2: QLocalServer receiving duplicated readyRead signals

I'm puzzled with a problem designing a simple QLocalServer-QLocalSocket IPC system. The QLocalServer waits for a new connection and connect the signals to the proper slots. void CommandProcessor::onNewConnection() { QLocalSocket* pLocal =…
Hernán
  • 4,527
  • 2
  • 32
  • 47
0
votes
1 answer

how to transfer QImage from QLocalServer to QLocalSocket

I have two mac apps that communicate with each other using QLocalSocket. Able to send the received QString but not able to send the received QImage Below is my code. SERVER SIDE CODE QImage image(":/asset/logo_active.png"); QByteArray ba; …
Mohammed Ebrahim
  • 849
  • 1
  • 12
  • 22
0
votes
0 answers

problem with QLocalSocket sending continues data to QLocalServer

I'm trying to send some data from QLocalSocket to QLocalSever in a loop. Sever only gets the first data and not receiving subsequent data, but if I introduce 1 mec delay between each call from the client then the server starts to receive everything.…
Vencat
  • 1,272
  • 11
  • 36
0
votes
1 answer

Close blocking QLocalServer from other thread

I am running a blocking QLocalServer in a thread: void QThread::stopServer() { m_abort = true; m_server.close(); // QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread } void QThread::run() { m_server =…
Hyndrix
  • 4,282
  • 7
  • 41
  • 82
0
votes
1 answer

Using async QLocalServer with QEventLoop

I want to run a QLocalServer in an application using asynchronous signals/slots which does not use QCoreApplication. As far as I understand this should work using a QEventLoop: void MyThread::startSocketServer() { m_server = new QLocalServer(); …
Hyndrix
  • 4,282
  • 7
  • 41
  • 82
0
votes
1 answer

Memory leakage in QLocalServer/QLocalSocket

I have some problem in using QLocalServer/QLocalSocket. I'm sending raw pixel data from server to client, and there is a huge memory leakage while process. but I couldn't know what is the reason... Memory increases about 20MB/1sec (when I checked…
Seungsoo Kim
  • 53
  • 1
  • 7
0
votes
1 answer

QLocalServer emits readyRead when bytes are not available

I'm trying to start QLocalServer in my local OSX 10.11. I have client which tries connection to server in loop: int connect(const char* filename) { int sock; struct sockaddr_un serv_addr; memset(&serv_addr, 0x00, sizeof(serv_addr)); …
fhdnsYa
  • 443
  • 1
  • 6
  • 15