Comments (6)
The library includes bridges between pipelines and arbitrary streams, so my recommendation would be : just wrap SslStream
in a pipelines bridge. This is exactly what we do in SE.Redis. This approach:
- requires zero API extension
- works for any kind of stream
- doesn't place any library-imposed limits on how you configure your
SslStream
from pipelines.sockets.unofficial.
Yes, this makes sense, but isn't this wrapping a standard thing that will work for anyone? SocketConnection.ConnectAsync
is a convenient method that hides Socket
creation, so SslStream wrapping could be hidden as well. SslStream
configuration options could be passed through parameters. Of course I can copy the SE.Redis implementation as well as any other developer that needs it, but wouldn't it be better to keep it in common place?
from pipelines.sockets.unofficial.
TLS config is so complex that frankly I don't see the advantage of trying to describe it as an API: it would be re-exposing every conceivable option that already exists on SslStream. Plus: it probably makes sense to go Socket=>NetworkStream=>SslStream=>(bridge), so pipelines isn't really involved until after you have done that.
There might be some potential as an ASP.NET config style, perhaps? But...
Tell you what: can you tell me what you think this API would look like to be useful, so we can picture it?
from pipelines.sockets.unofficial.
First, I want it to be transparent, just like in SE.Redis example, where we get IDuplexPipe
no matter is it secure connection or normal.
Second, as for api we need 3 user parameters for SslStream
creation, and additional 3 parameters for AuthenticateAsClient
(btw why is it not AuthenticateAsClientAsync
?). All of them could be joined in a class (like SslOptions with fields SslStreamOptions and AuthenticateOptions) and passed as an additional optional parameter to SocketConnection.ConnectAsync
.
from pipelines.sockets.unofficial.
I think that is fine if you only ever want an SslStream shim, but I would say that way lies madness to just grab their API it's a mess of legacy and crazy.
from pipelines.sockets.unofficial.
Ok, let the parameter be called SslShimOptions
=) But looks like using this shim is the only way to get the job done as for today.
from pipelines.sockets.unofficial.
Related Issues (20)
- Xamarin.Android crash with native exception on SocketConnection.Create HOT 2
- How to find out when/if the reader/writer completed HOT 3
- Does this project only support .Net Core, instead of .Net Framework? HOT 8
- if the implementation of this library has relation ship for Rio(Winsock registered I/O extensions) in Windows? HOT 2
- Unable to wait for socket closure HOT 2
- Test: MutexSlim_ConcurrentLoadAsync_DisableContext - fails on my machine
- Test: ConnectTests.Connect - Fails on my machine HOT 1
- Test: BufferWriterDoesNotLeak also fails on my machine
- Set unsafeSuppressExecutionContextFlow on SocketAsyncEventArgs HOT 3
- Loopback fast path is deprected on Windows and can cause high cpu on Win Server 2019 HOT 2
- How do I flush synchronously? HOT 5
- Pump a pair of PipeReader/PipeWriter
- Investigating SemaphoreSlim on net6.0+ HOT 1
- Unnecessary _queue.Count check in DedicatedThreadPoolPipeScheduler.RunWorkLoop HOT 7
- netstandard2.1 DoReceive fails on Zero Length Reads on Mono HOT 1
- Thread Safety Violation Warnings found by InferSharp static analysis tool HOT 3
- Trim and AOT warnings in Delegates and PerTypeHelpers HOT 3
- Fix Thread Safety and other static code analysis issues reported by Infer#
- Improve package readme
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.sockets.unofficial.