mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
change protocol to module
This commit is contained in:
@@ -12,9 +12,9 @@ type UDPServer struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProtocol(ProtocolRegistration{
|
||||
RegisterModule(ModuleRegistration{
|
||||
Type: "udp.server",
|
||||
New: func(params map[string]any) (Protocol, error) {
|
||||
New: func(params map[string]any) (Module, error) {
|
||||
port, ok := params["port"]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("udp server requires a port parameter")
|
||||
|
||||
Reference in New Issue
Block a user