Skip to content

Commit

Permalink
Merge pull request #12 from Lichmaker/hotfix/20250211-server
Browse files Browse the repository at this point in the history
iec104 server handler bug fixed
  • Loading branch information
wendy512 authored Feb 12, 2025
2 parents b37b6c3 + 1436d08 commit 3d7a81a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/core.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package server

import (
"strconv"

"github.com/wendy512/go-iecp5/asdu"
"github.com/wendy512/go-iecp5/clog"
"github.com/wendy512/go-iecp5/cs104"
"strconv"
)

// Settings 连接配置
Expand Down Expand Up @@ -64,10 +65,10 @@ func (s *Server) Stop() {

// SetOnConnectionHandler set on connect handler
func (s *Server) SetOnConnectionHandler(f func(asdu.Connect)) {
s.SetOnConnectionHandler(f)
s.cs104Server.SetOnConnectionHandler(f)
}

// SetConnectionLostHandler set connect lost handler
func (s *Server) SetConnectionLostHandler(f func(asdu.Connect)) {
s.SetConnectionLostHandler(f)
s.cs104Server.SetConnectionLostHandler(f)
}

0 comments on commit 3d7a81a

Please sign in to comment.