panjf2000 / gnet

🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go.
https://gnet.host
Apache License 2.0
9.52k stars 1.03k forks source link

Serving multiple UDP ports #199

Closed gordeyg closed 3 years ago

gordeyg commented 3 years ago

I'm looking for alternative to evio. One of the features I use in evio is ability to define several addresses to listen on (more precise - same IP, different ports). Is there a way to do the same in gnet or plan to add that?

xscode-auto-reply[bot] commented 3 years ago

Thanks for opening a new issue. The team has been notified and will review it as soon as possible. For urgent issues and priority support, visit https://xscode.com/panjf2000/gnet

gordeyg commented 3 years ago

Hey, after playing around I see it works by just executing multiple gnet.Serve functions for different ports.
This was the first thing I tried before opening request, but I only saw sockets opened for one port by that time. Unfortunately can't tell which exactly changes helped to get expected behavior.