DialFunc returns the adequate dial function when we're on android.
()
| 1234 | |
| 1235 | // DialFunc returns the adequate dial function when we're on android. |
| 1236 | func (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 | |
| 1248 | func (c *Client) http2DialTLSFunc() func(network, addr string, cfg *tls.Config) (net.Conn, error) { |
| 1249 | trustedCerts := c.getTrustedCerts() |
no test coverage detected