Comments (15)
You can use the sha1 from my git repository by using the temp branch of rust-websocket.
In Cargo.toml:
[dependencies.websocket]
git = "https://github.com/cyderize/rust-websocket.git"
branch = "temp"
I opened a pull request a few days ago to the owner of rust-sha1, but they seem to be hard to contact at the moment.
from rust-websocket.
Unfortunately this leaves packages that depend on websocket unable to publish (to crates.io) in the meantime. Perhaps if the PR is not accepted within a reasonable timeline a fork could be published under an alternate name or something? Local/relative path vendorizing unfortunately seems prohibited by cargo for published packages; as well as git dependencies.
from rust-websocket.
Yeah, not having sha1 working is pretty much why I haven't been able to publish this version to crates.io.
I've decided to use sha1-hasher now, since it works - hopefully that should make it possible to continue using the library. That version is in the sha1-hasher branch and is published as 0.9.6 on crates.io.
from rust-websocket.
Looks like a good solution. When you make the switch I'll finally move slack-rs to 1.0-alpha.
from rust-websocket.
The crates.io version should now be working, although you might want to wait a while before moving to 1.0-alpha.
I've still got to deal with associated types, and there will likely be some large changes to the API (I might try to mirror the stream splitting from RFC517 rather than having clones are Arcs everywhere).
from rust-websocket.
Ok. I've gone ahead and started updating because there is so much that needs to be changed in my code to reach 1.0, but none of the calls to websocket need updating since the switch to websocket's hyper so far.
from rust-websocket.
I mean you may also need to change some of the websocket calls eventually as well - but they shouldn't be too major anyway (and I'll happily help out when I finish the changes).
from rust-websocket.
Ok, I'll continue to track crates.io 's latest as much as possible. Thanks.
from rust-websocket.
So i've updated to 0.9.6, and updated my demo project, and while i'm not 100% certain it isn't my fault i'm getting ResponseError("Sec-WebSocket-Accept is invalid")
when connecting to slack. I'm going to do some more debugging and report back.
from rust-websocket.
Well disabling the call to check res.validate(&key)
after connecting seems to leave everything else functioning as expected, so I'd say there's a bug somewhere between slack and rust-websocket.
from rust-websocket.
Yes, there seems to be a problem with validation - I neglected a lot of client-side testing, and this doesn't appear to work. I'll have a closer look at it (I've put it in issue #13).
from rust-websocket.
Ok, thanks.
from rust-websocket.
I think I've fixed the issue in 0.9.7. The WebSocketKey was being written incorrectly.
In actual fact, slack should've completely rejected the connection since the header was invalid, but I suppose it's designed to be a bit more robust.
from rust-websocket.
I've re-enabled validation after switching to 0.9.7 and it seems to be working as expected.
from rust-websocket.
I've now removed the dependency on a separate SHA-1 crate, since OpenSSL can already do SHA-1 (and much faster than any Rust crates).
Version 0.10.0 introduces a different API, so see the examples in examples/client.rs
and examples/server.rs
.
I've removed the clone() and Mutex stuff, instead using a split()
method to allow sending and receiving from different threads.
If you still need to be able to clone()
, you'll have to put the use an Arc<Mutex<Client>>
.
from rust-websocket.
Related Issues (20)
- leaking sockets HOT 8
- DataFrameError("Expected masked data frame") HOT 9
- "the trait `futures::Future` is not implemented for `websocket::futures::AndThen<std::boxed......" HOT 1
- ssl-client dont work HOT 6
- New PRs HOT 10
- Http Proxy Support (+ relevant tokio-tungstenite discussion) HOT 10
- Closing connection HOT 3
- Support for `wasm32-wasi` HOT 6
- Security issues with hyper versions `< 0.14.10` HOT 3
- weird "websocket protocol error" HOT 1
- Upgrade tokio-related dependencies to 1.15+ HOT 1
- Cross luaguage HOT 3
- Close message different behaviour on Mac and Linux. HOT 2
- Half-blocking method. Is it supported/possible? HOT 11
- How to get response header?
- How to close the connection properly?
- How to close the connection properly?
- TlsHandshakeFailure HOT 4
- Warning: Contains Code That Will Become an Error in a Future Release of Rust HOT 3
- Examples for dumper people ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-websocket.