mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
change protocol to module
This commit is contained in:
@@ -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