feat: Make the HandleConn method public. (#120)

This commit is contained in:
Hiram Chirino 2019-09-27 16:30:27 -04:00 committed by Jeff Lindsay
parent 866d0ddf79
commit f6d256ee25
2 changed files with 3 additions and 3 deletions

@ -228,11 +228,11 @@ func (srv *Server) Serve(l net.Listener) error {
}
return e
}
go srv.handleConn(conn)
go srv.HandleConn(conn)
}
}
func (srv *Server) handleConn(newConn net.Conn) {
func (srv *Server) HandleConn(newConn net.Conn) {
if srv.ConnCallback != nil {
cbConn := srv.ConnCallback(newConn)
if cbConn == nil {

@ -23,7 +23,7 @@ func (srv *Server) serveOnce(l net.Listener) error {
"session": DefaultSessionHandler,
"direct-tcpip": DirectTCPIPHandler,
}
srv.handleConn(conn)
srv.HandleConn(conn)
return nil
}