Documentation
¶
Overview ¶
Package kcpwrapper provides a wrapper around kcp that allows the use of regular net interfaces like dialing and listening. It is built to be compatible with servers and clients running github.com/xtaci/kcptun and duplicates some of the code from that project.
Index ¶
Constants ¶
View Source
const (
// SALT is use for pbkdf2 key expansion
SALT = "kcp-go"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonConfig ¶
type CommonConfig struct {
Key string `json:"key"`
Crypt string `json:"crypt"`
Mode string `json:"mode"`
MTU int `json:"mtu"`
SndWnd int `json:"sndwnd"`
RcvWnd int `json:"rcvwnd"`
DataShard int `json:"datashard"`
ParityShard int `json:"parityshard"`
DSCP int `json:"dscp"`
NoComp bool `json:"nocomp"`
AckNodelay bool `json:"acknodelay"`
NoDelay int `json:"nodelay"`
Interval int `json:"interval"`
Resend int `json:"resend"`
NoCongestion int `json:"nc"`
SockBuf int `json:"sockbuf"`
KeepAlive int `json:"keepalive"`
// contains filtered or unexported fields
}
CommonConfig contains common configuration parameters across dialers and listeners.
type DialerConfig ¶
type DialerConfig struct {
CommonConfig `mapstructure:",squash"`
Conn int `json:"conn"`
AutoExpire int `json:"autoexpire"`
ScavengeTTL int `json:"scavengettl"`
}
DialerConfig configures dialing
type ListenerConfig ¶
type ListenerConfig struct {
CommonConfig
Listen string `json:"listen"`
}
ListenerConfig configures listening
Click to show internal directories.
Click to hide internal directories.