Azure / DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
Other
4.09k stars 977 forks source link

Ability to dynamically adjust listening handlers #318

Closed joshua-mng closed 6 years ago

joshua-mng commented 6 years ago

I'm considering to use this amazing project for one of my projects. But before doing that I have this question which I can't find reasonable answer.

Once dotnetty app has been bootstrapped and started, is it possible to change the configuration to allow the app to listen on extra ports, or change existing listen port, etc ..

Let's say we have some GPS device listener server, when new device is added, we have to instruct the server to listen on extra ports, but don't won't to restart the app.

I would appreciate if anyone guide me into the correct direction, thank you!

nayato commented 6 years ago

listening on extra ports means simply calling ServerBootstrap.BindAsync(..) with different ports. Bootstrap is simply a configuration "shortcut" for building up listening channel. Changing existing port means closing earlier created listening channel (returned from BindAsync call) and opening another one with BindAsync