mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-08 16:10:26 +08:00
22 lines
336 B
Go
22 lines
336 B
Go
package serverconfigs
|
|
|
|
import "encoding/json"
|
|
|
|
type UDPProtocolConfig struct {
|
|
BaseProtocol `yaml:",inline"`
|
|
}
|
|
|
|
func (this *UDPProtocolConfig) Init() error {
|
|
err := this.InitBase()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// 转换为JSON
|
|
func (this *UDPProtocolConfig) AsJSON() ([]byte, error) {
|
|
return json.Marshal(this)
|
|
}
|