Comments (3)
You won't believe, but that was also my feeling when I first read this piece of code before we published the library :) However @agalakhov showed me that actually the messages aren't lost, take a look at FrameSocket::write_frame()
(it is called by send_one_frame()
), the messages are written to the out_buffer
and only then the actual sending is performed by FrameSocket::write_pending()
.
from tungstenite-rs.
Oh, neat.
from tungstenite-rs.
Thank you, probably this piece of code needs an additional comment since it looks confusing.
In fact, all send_*() functions are guaranteed to buffer the given information regardless of their error state (unless the error is so fatal that we can't continue at all and close the connection anyway).
from tungstenite-rs.
Related Issues (20)
- Replace net2 dependency with socket2
- Possible semver violation HOT 2
- On the issue of websocket blocking reads HOT 2
- New release for working with Http 1.0? HOT 7
- CHANGELOG.md entry missing for v0.21.0
- client_tls, stream is not upgradeable? HOT 1
- Document when functions can fail. HOT 1
- Socket should flush before closing HOT 1
- Regarding tungstenite’s support for packet capture tools HOT 2
- Bump version HOT 1
- Remove or make even more optional the `url` crate in the next version. HOT 1
- Connecting to a unix socket HOT 3
- Are there plans to add wasm support? HOT 2
- Sending bytes with text opcode HOT 1
- Why is EWOULDBLOCK considered an error during the initial HTTP upgrade handshake? HOT 7
- How to do non-blocking reads on client? HOT 5
- why am i forced to make copies? HOT 2
- Is there an example of a tungstenite-rs client that makes a websocket connection with mTLS? HOT 3
- TLS support for non-blocking client HOT 1
- 是否能自定义修改传入accept_hdr 里面的Request参数? HOT 1
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 tungstenite-rs.