Skip to content

Commit f6d256e

Browse files
chirinoprogrium
authored andcommitted
feat: Make the HandleConn method public. (#120)
1 parent 866d0dd commit f6d256e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ func (srv *Server) Serve(l net.Listener) error {
228228
}
229229
return e
230230
}
231-
go srv.handleConn(conn)
231+
go srv.HandleConn(conn)
232232
}
233233
}
234234

235-
func (srv *Server) handleConn(newConn net.Conn) {
235+
func (srv *Server) HandleConn(newConn net.Conn) {
236236
if srv.ConnCallback != nil {
237237
cbConn := srv.ConnCallback(newConn)
238238
if cbConn == nil {

session_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (srv *Server) serveOnce(l net.Listener) error {
2323
"session": DefaultSessionHandler,
2424
"direct-tcpip": DirectTCPIPHandler,
2525
}
26-
srv.handleConn(conn)
26+
srv.HandleConn(conn)
2727
return nil
2828
}
2929

0 commit comments

Comments
 (0)