Comments (4)
eg : we could turn it to StreamdTcp like
https://github.com/akka/akka/blob/release-2.3-dev/akka-stream/src/main/scala/akka/stream/scaladsl/Tcp.scala#L42
from netty-reactive-streams.
I think creating a publisher of channels is as simple as doing this:
Bootstrap bootstrap = new Bootstrap();
PublisherHandler<Channel> publisher = new PublisherHandler<>(Channel.class);
bootstrap.handler(publisher);
bootstrap.localAddress(...);
bootstrap.group(...);
bootstrap.bind();
Each subscriber will then need to add handlers to the pipeline, and then they need to register the channel to an event loop.
from netty-reactive-streams.
you can't use bootstrap here,cause it will register the channel to the eventloop for you .
here we should control it manually.
https://github.com/netty/netty/blob/master/transport/src/main/java/io/netty/bootstrap/ServerBootstrap.java#L181
from netty-reactive-streams.
It will register the ServerSocketChannel
with an event loop, but that's ok, we want that. The SocketChannel
for each incoming connection though won't be registered, that will be up to the subscriber. The thing that usually does that is the ServerBootstrap
, but we're not using a ServerBootstrap
, we're using an ordinary Bootstrap
.
Anyway, I just wrote a test to test this, it works, the actual code for setup is here:
from netty-reactive-streams.
Related Issues (17)
- License problems HOT 1
- CVE-2019-20444-There is a security vulnerability issue in netty-reactive-streams HOT 1
- NPE in HandlerPublisher.handlerRemoved
- Missing license file in maven repository HOT 1
- Use Flow Java api and drop support for reactive-streams HOT 1
- Update to netty 4.0.37.Final HOT 2
- publish 3.x to org.playframework instead of com.typesafe HOT 1
- Consider buffering HTTP request bodies HOT 1
- Can we issue a new release of the release of this library, please? HOT 3
- NPE in HandlerSubscriber in Play 2.5.9 HOT 3
- Performance/Stability issues over HTTP HOT 4
- lots of NoSuchElementException HOT 1
- HandlerSubscriber is racy (at least as used from RxJava) HOT 2
- Add an Automatic-Module-Name manifest entry HOT 5
- Provide library as OSGi bundle HOT 1
- Request to issue a new version of this library to upgrade netty version (fix CVEs) 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 netty-reactive-streams.