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

Cancel calls #2

Open
stepancheg opened this issue May 13, 2017 · 0 comments
Open

Cancel calls #2

stepancheg opened this issue May 13, 2017 · 0 comments

Comments

@stepancheg
Copy link
Owner

stepancheg commented May 13, 2017

Need to have an API to cancel calls by client.

When call is cancelled, RST_STREAM is sent.

Client needs an API to cancel calls, and server needs an API to be notified of cancelled call.

One idea is that start_request should have additional Context param:

fn start_request(&self, context: Context, headers: Headers, req: HttpPartStream)
    -> Response;

struct Context(...);

impl Context {
    fn new() -> Context { ... }

    // for client
    fn cancel(&self) { ... }

    // for the server to subscribe for cancel
    fn wait_cancel(&self) -> HttpFutureSend<()> { ... }
}
@stepancheg stepancheg changed the title Cancel client call if response future is destroyed Cancel client call if called future is destroyed May 13, 2017
@stepancheg stepancheg changed the title Cancel client call if called future is destroyed Cancel client call if caller future is destroyed May 25, 2017
@stepancheg stepancheg changed the title Cancel client call if caller future is destroyed Cancel calls May 25, 2017
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

No branches or pull requests

1 participant