Added kcp related configs

pull/170/head
Shelikhoo 2016-06-11 17:30:38 +08:00
parent 8666d122f0
commit 63c1f2106d
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package kcp
type AdvancedConfig struct {
Mtu int `json:"MaximumTransmissionUnit"`
Sndwnd int `json:"SendingWindowSize"`
Rcvwnd int `json:"ReceivingWindowSize"`
Fec int `json:"ForwardErrorCorrectionGroupSize"`
Acknodelay bool `json:"AcknowledgeNoDelay"`
Dscp int `json:"Dscp"`
ReadTimeout int `json:"ReadTimeout"`
WriteTimeout int `json:"WriteTimeout"`
}
type Config struct {
Mode string `json:"Mode"`
Key string `json:"EncryptionKey"`
AdvancedConfigs *AdvancedConfig `json:"AdvancedConfig,omitempty"`
}
var DefaultAdvancedConfigs = &AdvancedConfig{
Mtu: 1350, Sndwnd: 1024, Rcvwnd: 1024, Fec: 4, Dscp: 0, ReadTimeout: 60, WriteTimeout: 40, Acknodelay: false,
}