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
@@ -11,9 +11,9 @@ type TCPServer struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterProtocol(ProtocolRegistration{
|
||||
RegisterModule(ModuleRegistration{
|
||||
Type: "tcp.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("tcp server requires a port parameter")
|
||||
|
||||
Reference in New Issue
Block a user