MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / accept

Method accept

IceFireDB-Redis-Proxy/proxy/net.go:30–39  ·  view source on GitHub ↗
(conn bareneter.Conn)

Source from the content-addressed store, hash-verified

28)
29
30func (p *Proxy) accept(conn bareneter.Conn) bool {
31 if config.Get().IPWhiteList.Enable {
32 host, _, _ := net.SplitHostPort(conn.RemoteAddr())
33 if !utils.InArray(host, config.Get().IPWhiteList.List) {
34 return false
35 }
36 }
37
38 return true
39}
40
41func (p *Proxy) closed(conn bareneter.Conn, err error) {
42 return

Callers

nothing calls this directly

Calls 2

GetFunction · 0.92
InArrayFunction · 0.92

Tested by

no test coverage detected