Feature #755

Implement network_stream class

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

Status:ClosedStart date:12/13/2017
Priority:NormalDue date:12/23/2017
Assignee:David Demelier% Done:

100%

Category:-Estimated time:1.00 h
Target version:0.2Spent time:1.00 h
MFD after: Bookmark:@
MFD revision: Submitted by:
Branch:default

Description

The current network code duplicates the handling of recv/send stuff. Create a unique network_stream class which automatically handle recv/send stuff and flushing.

Associated revisions

Revision 157:f25f5fea66af
Added by David Demelier 6 months ago

Common: implement network_stream class, closes #755 @1h

This class handles receive/send operations under the hood, it automatically does
the following things:

- parse/dump JSON message using '\r\n\r\n',
- detect errors/disconnections and mark them as network_down,
- flush receive/send after a successful operation.

Acked-by: Alexis Dörr

History

#1 Updated by David Demelier 6 months ago

  • Status changed from New to Feedback
  • Due date set to 12/23/2017

#2 Updated by David Demelier 6 months ago

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

#3 Updated by David Demelier 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF