Closed RealistikDash closed 1 year ago
Yes.
Would be fine if you could add at least those options :
ikcp_wndsize(kcp1, 128, 128);
ikcp_nodelay(kcp1, 0, 10, 0, 1);
Will do today
Actually, it appears this was already implemented in 69046130e76322be09275e59d4800b0093b4da6c and 3099f62ec8f83b9fd831e8253f4cce1bc6e6c016. It appears I forgot to close this.
This means that it is already possible to customise these settings. For KCPClientSync
, it is done through the constructor:
def __init__(
self,
address: str,
port: int,
conv_id: int,
no_delay: bool,
update_interval: int,
resend_count: int,
no_congestion_control: bool,
receive_window_size: int,
send_window_size: int,
) -> None:
For KCPServerAsync
, you have two options:
def __init__(
self,
address: str,
port: int,
conv_id: int,
delay: int = 100,
connection_timeout: int = 600,
max_transmission: int = 1400,
no_delay: bool = False,
resend_count: int = 2,
no_congestion_control: bool = False,
receive_window_size: int = 128,
send_window_size: int = 32,
) -> None:
set_performance_options
:
def set_performance_options(
self,
no_delay: Optional[bool] = None,
update_interval: Optional[int] = None,
resend_count: Optional[int] = None,
no_congestion_control: Optional[bool] = None,
receive_window_size: Optional[int] = None,
send_window_size: Optional[int] = None,
) -> None:
Hope this helps!
Currently, all connections use the default KCP settings without allowing for customisation. This change should allow the user to call a function to customise the creation of all new KCP connections.