Skip to content

Commit 50b53e8

Browse files
authored
Add switch case for KQueue in TcpServer#bindImpl (GeyserMC#42)
1 parent 6c9483e commit 50b53e8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/com/github/steveice10/packetlib/tcp/TcpServer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import io.netty.channel.epoll.EpollEventLoopGroup;
1616
import io.netty.channel.epoll.EpollServerSocketChannel;
1717
import io.netty.channel.*;
18+
import io.netty.channel.kqueue.KQueueEventLoopGroup;
19+
import io.netty.channel.kqueue.KQueueServerSocketChannel;
1820
import io.netty.channel.nio.NioEventLoopGroup;
1921
import io.netty.channel.socket.ServerSocketChannel;
2022
import io.netty.channel.socket.nio.NioServerSocketChannel;
@@ -55,6 +57,10 @@ public void bindImpl(boolean wait, final Runnable callback) {
5557
this.group = new EpollEventLoopGroup();
5658
this.serverSocketChannel = EpollServerSocketChannel.class;
5759
break;
60+
case KQUEUE:
61+
this.group = new KQueueEventLoopGroup();
62+
this.serverSocketChannel = KQueueServerSocketChannel.class;
63+
break;
5864
case NIO:
5965
this.group = new NioEventLoopGroup();
6066
this.serverSocketChannel = NioServerSocketChannel.class;

0 commit comments

Comments
 (0)