| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 | package kcp/*AdvancedConfig define behavior of KCP in detailMaximumTransmissionUnit:Largest protocol data unit that the layer can pass onwardscan be discovered by running tracepathSendingWindowSize , ReceivingWindowSize:the size of Tx/Rx window, by packetForwardErrorCorrectionGroupSize:The the size of packet to generate a Forward Error Correctionpacket, this is used to counteract packet loss.AcknowledgeNoDelay:Do not wait a certain of time before sending the ACK packet,increase bandwich cost and might increase performanceDscp:Differentiated services code point,be used to reconized to discriminate packet.It is recommanded to keep it 0 to avoid being detected.ReadTimeout,WriteTimeout:Close the Socket if it have been silent for too long,Small value can recycle zombie socket faster butcan cause v2ray to kill the proxy connection it is relaying,Higher value can prevent server from closing zombie socket andwaste resources.*//*Config define basic behavior of KCPMode:can be one of these values:fast3,fast2,fast,normal<<<<<<- less delay->>>>>> less bandwich wasted*/type Config struct {	Mtu        int	Sndwnd     int	Rcvwnd     int	Acknodelay bool}func (this *Config) Apply() {	effectiveConfig = *this}func DefaultConfig() Config {	return Config{		Mtu:        1350,		Sndwnd:     1024,		Rcvwnd:     1024,		Acknodelay: true,	}}var (	effectiveConfig = DefaultConfig())
 |