Closed skrchnavy closed 6 years ago
@MatthieuDartiailh code tested and ready for final review
I may need some time to review this. Hopefully I will merge sometimes next week.
One stupid question: shouldn't timeout
on the TCPIP session be a private attribute rather than a public one ? From my understanding it should only be set through the visa attribute and not directly.
Further changes / fixes in timeout handling added, some comments applied).
Regarding Session.timeout
attribute: it is protected but also 'Session.attrs,
Session.interfaceor
Session.parsed` are protected. Candidate for writing new issue for this kind of refactoring.
How to cope with the SUCCESS
naming convention? spread across Sessions. Which is prefered? (I like StatusCode.success
way as it is used for reast of status codes and short enough.)
@MatthieuDartiailh #118 have to be resolved (merged or closed) before this issue (in conflict)
Merging. Thanks again @skrchnavy
bors r+
Session.attrs
table enhanced to support getter and setter methods, not only valuesVI_ATTR_TMO_VALUE
attribute handling unified to setup also self.timeout as value holder (can be used in sessions and is set to 'python' timeout - seconds as float or None for infinite)_get_timeout
/_set_timeout
methods added and updated for places where external lib timeout is setup.Session.attrs
table used for implementation with getters and setters_pending_buffer
is main buffer for handling received data, removed copying from temp buffer (out
) and pending buffer