change protocol to module

This commit is contained in:
Joel Wetzell
2025-11-18 18:14:11 -06:00
parent 93c6c05591
commit a7996530a1
8 changed files with 63 additions and 63 deletions

View File

@@ -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")