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

Call middleware #318

Merged
merged 9 commits into from
Oct 30, 2018
Merged

Call middleware #318

merged 9 commits into from
Oct 30, 2018

Conversation

tomusdrw
Copy link
Contributor

No description provided.

Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code lgtm but I am a bit hazy on the context here; is this preparatory work for proxying/caching?

@tomusdrw
Copy link
Contributor Author

tomusdrw commented Oct 5, 2018

@dvdplm Indeed. The middleware that allows you to handle every single Call makes writing the JSONRPC-proxy much easier. But I also believe it might be useful in general in the library, hence the PR.

@tomusdrw tomusdrw merged commit a39139f into master Oct 30, 2018
@tomusdrw tomusdrw deleted the td-callmiddleware branch October 30, 2018 11:35
if cfg!(windows) { 58 } else { 59 },
result.len()
assert!(
result.len() == 58 || result.len() == 59
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this modification (58 for Windows) was only required for appveyor and not travis windows, I guess travis is using visualstudio2017 toolchain

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, although afaict the port is just chosen randomly, so it's weird to assume that it's always going to be a 5-digit number.

tomusdrw added a commit that referenced this pull request Oct 30, 2018
* Avoid Boxing in middleware.

* Add on_call to the middleware.

* Properly workaround FnOnce in the on_drop interface.

* Re-export separator from tcp server.

* Fix windows build again.
tomusdrw added a commit that referenced this pull request Oct 30, 2018
* Avoid Boxing in middleware.

* Add on_call to the middleware.

* Properly workaround FnOnce in the on_drop interface.

* Re-export separator from tcp server.

* Fix windows build again.
CriesofCarrots pushed a commit to CriesofCarrots/jsonrpc that referenced this pull request Dec 7, 2018
* Avoid Boxing in middleware.

* Add on_call to the middleware.

* Properly workaround FnOnce in the on_drop interface.

* Re-export separator from tcp server.

* Fix windows build again.
CriesofCarrots pushed a commit to solana-labs/jsonrpc that referenced this pull request Dec 7, 2018
* Avoid Boxing in middleware.

* Add on_call to the middleware.

* Properly workaround FnOnce in the on_drop interface.

* Re-export separator from tcp server.

* Fix windows build again.
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.

3 participants