File tree Expand file tree Collapse file tree
common/src/main/java/dev/ryanhcode/sable/mixin/udp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import io .netty .bootstrap .Bootstrap ;
1010import io .netty .channel .*;
1111import io .netty .channel .epoll .Epoll ;
12+ import io .netty .channel .epoll .EpollChannelOption ;
1213import io .netty .channel .epoll .EpollDatagramChannel ;
1314import io .netty .channel .local .LocalAddress ;
1415import io .netty .channel .local .LocalServerChannel ;
@@ -67,6 +68,7 @@ public class ServerConnectionListenerMixin implements ServerConnectionListenerEx
6768 this .channels .add (new Bootstrap ()
6869 .channel (channelClass )
6970 .option (ChannelOption .SO_BROADCAST , true )
71+ .option (EpollChannelOption .SO_REUSEPORT , true )
7072 .handler (new ChannelInitializer <>() {
7173 @ Override
7274 protected void initChannel (final Channel channel ) {
@@ -93,6 +95,7 @@ protected void initChannel(final Channel channel) {
9395 this .channels .add (new Bootstrap ()
9496 .channel (LocalServerChannel .class )
9597 .option (ChannelOption .SO_BROADCAST , true )
98+ .option (EpollChannelOption .SO_REUSEPORT , true )
9699 .handler (new ChannelInitializer <>() {
97100 @ Override
98101 protected void initChannel (final Channel channel ) {
You can’t perform that action at this time.
0 commit comments