Instant Messenger Program
I am starting a Instant Messenger program in C++, Qt for the UI and
WinSocks for the socket stuff. I had a couple of questions.
From what I've been reading on Qt, when you start your main application
exec() has to be called from the main thread to enable event handling. But
considering exec blocks, and I need to be constantly checking from the
Main application if someone is trying to connect, I can't afford to block.
And I need event handling because when the user clicks on one of his
contacts name, it should connect and be able to send messages. Is the best
way to get around this to check for incoming connections in a separate
thread? And also connecting to other people in a separate thread? I just
wasn't sure if this was the best way because I feel like I'm going to have
a bunch of threads everywhere. And I'm not really sure of all of Qt's
capabilities because I just started using it.
Should I be using Boost for sockets? Which is better? I'm all about
learning what's most relevant so what are your guys opinion.
Any other tips on how I should go about things would be appreciated also.
No comments:
Post a Comment