James.Zhou
James.Zhou

Reputation: 141

How can Qt process communicate with normal Linux process?

By UNIX domain socket?

By normal TCP/UDP socket?

In my xenomai layer, I have use xddp to generate one virtual port(/dev/rtp0), normal Linux process can access by open this port, and read/write the stream. But it seams difficult for Qt to access the port using QFile.

Upvotes: 2

Views: 334

Answers (2)

James.Zhou
James.Zhou

Reputation: 141

I tested the QLocalServer, it works! The Qt process can send data to the xenomai process by the UNIX domain socket.

Upvotes: 1

Marcus Müller
Marcus Müller

Reputation: 36346

By UNIX domain socket? By normal TCP/UDP socket?

the answer is: yes, both, why not?

Qt processes are normal processes, and they can do whatever other linux processes can do. You should be able to open a device file like you'd open it in any other process. Also note that no-one's forcing you to use QFile; you can use normal fopen/fread/mmap/ioctl.. whatever you do to interact with your /dev/rtp0, but I don't think there's anything stopping you from handling files as QFile and getting the low-level file descripter as soon as you need it from that class.

Upvotes: 2

Related Questions