Comments (6)
- Over disposing
the first is not over-disposed; see just before the return
in the success case where it nukes the things (having transferred disposal ownership to result
:
Method = Path = HttpVersion = default(ReadableBuffer);
Headers = null;
-
Copying data into a readable buffer
if ((len + WebSocketKeySuffixBytes.Length) > buffer.Length) throw new ArgumentException("Oversized key", nameof(key));
(note that the buffer is initialized with an Alloc
that gives it more than enough than we need for this scratch area)
- Should this be more graceful
Yes
- GetRaw and GetInt32
Nice; will do
- Dispose the
HttpRequest
after making the socket object
No; I use it in CompleteHandshakeAsync
, and (oops) it should be available in OnAuthenticateAsync
. It is already disposed via using
when I am done with it.
from pipelines.websockets.
Note: a method called uint GetInt32()
sounds... wrong. GetUInt32()
?
from pipelines.websockets.
the first is not over-disposed; see just before the return in the success case where it nukes the things (having transferred disposal ownership to result:
Ah! subtle...
(note that the buffer is initialized with an Alloc that gives it more than enough than we need for this scratch area)
The danger is that blocks are shared and you don't want to write into a slice of data you don't own. This is an interesting scenario though. Need to think through this one...
Note: a method called uint GetInt32() sounds... wrong. GetUInt32() ?
Yea it should be Uint32
from pipelines.websockets.
But surely if I'm writing into a chunk that I obtained via Alloc with a minimum size, I know I'm OK as long as I don't screw up the offsets? I do check that we have enough in the span from the Alloc - am I missing something?
from pipelines.websockets.
if the issue is that I need to call Ensure()
, I can do that - but I thought that was implicit from an Alloc
with minimum size
from pipelines.websockets.
Wait, I'm blind. I thought you were writing into the ReadableBuffer this is fine.
from pipelines.websockets.
Related Issues (3)
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 pipelines.websockets.