Skip to content

Telnet: buffered output for AsyncTcp server - #1929

Merged
mcspr merged 10 commits into
xoseperez:devfrom
mcspr:telnet/buf
Oct 9, 2019
Merged

Telnet: buffered output for AsyncTcp server#1929
mcspr merged 10 commits into
xoseperez:devfrom
mcspr:telnet/buf

Conversation

@mcspr

@mcspr mcspr commented Oct 2, 2019

Copy link
Copy Markdown
Collaborator

This is something I had noticed with Sonoff Basic board running lwip2 low-memory
scheduling is +400B
buffering is +1.4KB

Why not AsyncTCPbuffer? -1KB code size and slightly less memory allocations.
And technically, nothing stops us from using this class for something else.

@mcspr

mcspr commented Oct 5, 2019

Copy link
Copy Markdown
Collaborator Author

It would also make sense to always buffer / add callback (#1909) for shared data (debug, ws announce). But it feels like it would be much easier to implement this with another class that only does that specific thing on a list of clients, pushing chunks of data in a queue until every client has it (...onAck for each client should count written data)

Debugging itself needs a queue of sorts to help with that, but that is a whole other issue.
edit:Linux printk could be used as a reference for some of the parts.
edit:Rsyslog error messaging (LogMsg func), internal message queue (submitMsg2), etc.
edit:Rsyslog queue (internal module)
edit:Syslog-ng's queueing should be explored too
edit2 ... formatting

Also a honorable mention of AsyncPrinter.cpp, but technically we don't need (or want, because of delay() usage) Stream API.

@mcspr
mcspr merged commit 1949bc8 into xoseperez:dev Oct 9, 2019
@mcspr
mcspr deleted the telnet/buf branch October 9, 2019 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant