Change request #791

irc class must not own queue

Added by David Demelier 8 months ago. Updated 8 months ago.

Status:ClosedStart date:04/11/2018
Priority:NormalDue date:
Assignee:David Demelier% Done:

100%

Category:irccdEstimated time:1.00 h
Target version:3.0.0Spent time:1.00 h
MFD after: Bookmark:@
MFD revision: Platform:
Branch:default

Description

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.

Associated revisions

Revision 674:960d1b6fa03e
Added by David Demelier 8 months ago

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.

History

#1 Updated by David Demelier 8 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved

#2 Updated by David Demelier 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF