mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-09-11 07:59:25 +00:00
change protocol to module
This commit is contained in:
+2
-2
@@ -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