Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a postWrite hook #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Commits on Jul 7, 2023

  1. Introduce a postWrite hook.

    If you are sending large amounts of data (multiple megabytes) and you don't want to allocate that large a byte slice, one option is to send the data and have a mechanism to Wake() the connection up after the write is done. This will require a postWrite(conn) hook that also provides a reference to the connection for which data was just written. This way the application can maintain state in the context and in the postWrite hook, call Wake() and send the next batch of data when the Data() hook gets called.
    abramk committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    e1e8a34 View commit details
    Browse the repository at this point in the history