MCPcopy
hub / github.com/perkeep/perkeep / DialFunc

Method DialFunc

pkg/client/client.go:1236–1246  ·  view source on GitHub ↗

DialFunc returns the adequate dial function when we're on android.

()

Source from the content-addressed store, hash-verified

1234
1235// DialFunc returns the adequate dial function when we're on android.
1236func (c *Client) DialFunc() func(network, addr string) (net.Conn, error) {
1237 if c.useTLS() {
1238 return nil
1239 }
1240 if android.IsChild() {
1241 return func(network, addr string) (net.Conn, error) {
1242 return android.Dial(network, addr)
1243 }
1244 }
1245 return nil
1246}
1247
1248func (c *Client) http2DialTLSFunc() func(network, addr string, cfg *tls.Config) (net.Conn, error) {
1249 trustedCerts := c.getTrustedCerts()

Callers 1

transportForConfigMethod · 0.95

Calls 3

useTLSMethod · 0.95
IsChildFunction · 0.92
DialFunction · 0.92

Tested by

no test coverage detected