MCPcopy
hub / github.com/cloudflare/cloudflared / DialTCP

Method DialTCP

ingress/origin_dialer.go:132–139  ·  view source on GitHub ↗
(ctx context.Context, dest netip.AddrPort)

Source from the content-addressed store, hash-verified

130}
131
132func (d *Dialer) DialTCP(ctx context.Context, dest netip.AddrPort) (net.Conn, error) {
133 conn, err := d.Dialer.DialContext(ctx, "tcp", dest.String())
134 if err != nil {
135 return nil, fmt.Errorf("unable to dial tcp to origin %s: %w", dest, err)
136 }
137
138 return conn, nil
139}
140
141func (d *Dialer) DialUDP(dest netip.AddrPort) (net.Conn, error) {
142 conn, err := d.Dialer.Dial("udp", dest.String())

Callers

nothing calls this directly

Calls 3

ErrorfMethod · 0.80
DialContextMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected