Change request #791
irc class must not own queue
|Assignee:||David Demelier||% Done:|
|Category:||irccd||Estimated time:||1.00 h|
|Target version:||3.0.0||Spent time:||1.00 h|
As with other related network change, the IRC class is low level API and should not own any kind of operation queue. Instead, it just dispatch to the correct socket type the operation at runtime. In the same time, create a message queue in the server class which postpone message until the server is connected.
Irccd: do not own a queue in irc::connection class, closes #791 @1h
Since the server is an automatic state machine that recreate a new session after
a connection failure, we may have some invalid references in the irc::connection
class if there are still handler running.
Because server is already a std::shared_ptr that manages itself, it was heavy to
do the same in irc::connection class. Therefore, the irc::connection class is
now only responsible of connecting/receiving/sending data (and parsing it).
Update the server class to use a send queue and allow the user sending command
at any time which will be postponed once connected.