Skip to content

Any plans on supporting QSerialPort as first party socket? #102

Answered by danvratil
DeveloperPaul123 asked this question in Q&A
Discussion options

You must be logged in to vote

Just looking at the code of QSerialPort (which I assume is what you meant instead of QSerialSocket) and I think it should work out-of-the-box with the existing QCoroIODevice wrapper.

The reason the other sockets got their own wrappers is that they have asynchronous state which needs to be taken into account. But QSerialPort doesn't have async state and open() and close() are synchronous operations, so I think it shoud work just fine with QCoroIODevice.

Please try out and let me know if there are any issues. If it turns out there's a need for a dedicated wrapper type, I'm totally fine with implementing it.

I realize that it's confusing why some QIODevices need a special wrapper and some wo…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@danvratil
Comment options

@DeveloperPaul123
Comment options

@danvratil
Comment options

Comment options

You must be logged in to vote
1 reply
@DeveloperPaul123
Comment options

Answer selected by DeveloperPaul123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants