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

Method ConnectionOptionsSnapshot

client/config.go:47–60  ·  view source on GitHub ↗
(originIP net.IP, previousAttempts uint8)

Source from the content-addressed store, hash-verified

45}
46
47func (c *Config) ConnectionOptionsSnapshot(originIP net.IP, previousAttempts uint8) *ConnectionOptionsSnapshot {
48 snapshot := c.featureSelector.Snapshot()
49 return &ConnectionOptionsSnapshot{
50 client: pogs.ClientInfo{
51 ClientID: c.ConnectorID[:],
52 Version: c.Version,
53 Arch: c.Arch,
54 Features: snapshot.FeaturesList,
55 },
56 originLocalIP: originIP,
57 numPreviousAttempts: previousAttempts,
58 FeatureSnapshot: snapshot,
59 }
60}
61
62func (c ConnectionOptionsSnapshot) ConnectionOptions() *pogs.ConnectionOptions {
63 return &pogs.ConnectionOptions{

Callers 2

connectionOptionsMethod · 0.80

Calls 1

SnapshotMethod · 0.65

Tested by 1