Skip to content

Commit

Permalink
made hijacker's init public
Browse files Browse the repository at this point in the history
  • Loading branch information
cszichao committed Nov 27, 2019
1 parent a90d65c commit 3a59d67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/hijacker.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (p *HijackerPool) Get(clientAddr net.Addr, isHTTPS bool, host, port string)
} else {
h = v.(*Hijacker)
}
h.init(clientAddr, isHTTPS, host, port, &p.Handler)
h.Init(clientAddr, isHTTPS, host, port, &p.Handler)
return h
}

Expand Down Expand Up @@ -144,7 +144,8 @@ type Hijacker struct {
hijackedResp *HijackedResponse
}

func (h *Hijacker) init(clientAddr net.Addr, isHTTPS bool, host, port string, handler *HijackHandler) {
// Init initialize hijacker
func (h *Hijacker) Init(clientAddr net.Addr, isHTTPS bool, host, port string, handler *HijackHandler) {
h.connInfo.reset()
h.requestHeader.reset()

Expand Down

0 comments on commit 3a59d67

Please sign in to comment.