mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 11:24:57 -05:00
Expose packet handler executor
This commit is contained in:
parent
7fd279b6ac
commit
5637fbedaf
1 changed files with 6 additions and 1 deletions
|
@ -43,6 +43,7 @@ import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.ThreadFactory;
|
import java.util.concurrent.ThreadFactory;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@ -76,7 +77,11 @@ public class TcpClientSession extends TcpSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
public TcpClientSession(String host, int port, String bindAddress, int bindPort, PacketProtocol protocol, ProxyInfo proxy) {
|
public TcpClientSession(String host, int port, String bindAddress, int bindPort, PacketProtocol protocol, ProxyInfo proxy) {
|
||||||
super(host, port, protocol, DefaultPacketHandlerExecutor.createExecutor());
|
this(host, port, bindAddress, bindPort, protocol, proxy, DefaultPacketHandlerExecutor.createExecutor());
|
||||||
|
}
|
||||||
|
|
||||||
|
public TcpClientSession(String host, int port, String bindAddress, int bindPort, PacketProtocol protocol, ProxyInfo proxy, Executor packetHandlerExecutor) {
|
||||||
|
super(host, port, protocol, packetHandlerExecutor);
|
||||||
this.bindAddress = bindAddress;
|
this.bindAddress = bindAddress;
|
||||||
this.bindPort = bindPort;
|
this.bindPort = bindPort;
|
||||||
this.proxy = proxy;
|
this.proxy = proxy;
|
||||||
|
|
Loading…
Reference in a new issue