Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.0 #196

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

V4.0 #196

wants to merge 5 commits into from

Conversation

VergilYotov
Copy link

In v4.0 the objective is to use QLocalSocket for not only for inter-instance communication, but for proof of being the primary instance. Only one instance at a time can be the QLocalServer which is what I am using as the proof of primary instead of QSharedMemory.

We also make Qt6 the default.

There are several important considerations. As we will now rely on prompt responses from theQLocalServer it needs to run in a separate thread, to ensure the application doesn't block it from responding to messages.

I also want to remove the stateful messages, which were added as a fix in 3.0.

Instead all messages are encoded/decoded through the MessageCoder class which uses QDataStream and directly attaches to the socket data stream. When we parse the message from the socket, if the parse fails, we skip over one byte and try again until we succeed. This ensures even if the data is garbled we will eventually parse the next message.

I kind of wanted a more self-contained message interface hence the SingleApplicationMessage class, but I couldn't figure out how to fit it in.

There are a lot of TODOs with code that needs to be implemented and stubbed functions.

@itay-grudev itay-grudev marked this pull request as draft August 8, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants