feat:KCP协议
This commit is contained in:
@@ -18,6 +18,7 @@ var dialServer = dialServerWithOptions
|
||||
type clientOptions struct {
|
||||
logger latencylog.Logger
|
||||
txTimestampDebugLogger transport.TXTimestampDebugLogger
|
||||
kcpPacketDebugLogger transport.KCPPacketDebugLogger
|
||||
bindIP string
|
||||
bindDevice string
|
||||
}
|
||||
@@ -39,6 +40,13 @@ func WithTXTimestampDebugLogger(logger transport.TXTimestampDebugLogger) Option
|
||||
}
|
||||
}
|
||||
|
||||
// WithKCPPacketDebugLogger 为 KCP UDP packet timestamp 调试日志注入记录器。
|
||||
func WithKCPPacketDebugLogger(logger transport.KCPPacketDebugLogger) Option {
|
||||
return func(options *clientOptions) {
|
||||
options.kcpPacketDebugLogger = logger
|
||||
}
|
||||
}
|
||||
|
||||
// WithBindIP 指定拨号时使用的本地源 IP。
|
||||
func WithBindIP(ip string) Option {
|
||||
return func(options *clientOptions) {
|
||||
|
||||
Reference in New Issue
Block a user