Documentation ¶
Index ¶
- Variables
- func Debug(msg interface{})
- func Debugf(format string, args ...interface{})
- func DecodeSignalMsg(raw []byte) (string, interface{}, error)
- func IsPublicAddr(addr net.IP) bool
- func SetDebugLogger(l *log.Logger)
- type ConsumerInfo
- type DebugAddr
- type Endpoint
- type GenesisMsg
- type ICECandidate
- type OfferMsg
- type PathAssertion
- type QUICStreamNetConn
- type SignalMsg
- type SignalMsgType
Constants ¶
This section is empty.
Variables ¶
var QUICCfg = quic.Config{ MaxIncomingStreams: int64(2 << 16), MaxIncomingUniStreams: int64(2 << 16), MaxIdleTimeout: 16 * time.Second, KeepAlivePeriod: 8 * time.Second, }
var Version = "v0.0.2"
Must be a valid semver
var VersionHeader = "X-BF-Version"
Functions ¶
func DecodeSignalMsg ¶
func IsPublicAddr ¶
func SetDebugLogger ¶
Override the Logger used by broflake for debug messages
Types ¶
type ConsumerInfo ¶
TODO: ConsumerInfo is the downstream router's counterpart to PathAssertion. It's meant to describe useful information about a downstream connectivity situation. Like PathAssertion, a Nil() ConsumerInfo indicates no connectivity. ConsumerInfo lives here both to keep things consistent and because we imagine that ConsumerInfo objects may be served by Freddie, who will also perform the required IP geolocation during the discovery and matchmaking process. ConsumerInfo might one day evolve to become the consumer-side constraints object which is discussed in the RFCs, at which point it might make sense to collapse PathAssertion and ConsumerInfo into a single concept. ConsumerInfo (and its client-specific accomplice, ConsumerInfoIPC) were motivated solely to provide UI status information, and it's irksome that they exist for this reason alone.
func (ConsumerInfo) Nil ¶
func (ci ConsumerInfo) Nil() bool
type GenesisMsg ¶
type GenesisMsg struct {
PathAssertion PathAssertion
}
type ICECandidate ¶
type ICECandidate struct { Foundation string `json:"foundation"` Priority uint32 `json:"priority"` Address string `json:"address"` Protocol webrtc.ICEProtocol `json:"protocol"` Port uint16 `json:"port"` Typ int `json:"type"` Component uint16 `json:"component"` RelatedAddress string `json:"relatedAddress"` RelatedPort uint16 `json:"relatedPort"` TCPType string `json:"tcpType"` // contains filtered or unexported fields }
type OfferMsg ¶
type OfferMsg struct { SDP webrtc.SessionDescription Tag string }
TODO: We observe that OfferMsg and ConsumerInfo have a special relationship: OfferMsg is how consumer data goes in, and ConsumerInfo is how consumer data comes out. A consumer's 'Tag' is supplied at offer time, encapsulated in an OfferMsg; later, that Tag is surfaced to the producer's UI layer in a ConsumerInfo struct. This suggests that these structures can probably be collapsed into a single concept.
type PathAssertion ¶
func (PathAssertion) Nil ¶
func (pa PathAssertion) Nil() bool
type QUICStreamNetConn ¶
XXX: AddrLocal and AddrRemote were added for compatibility with http-proxy-lantern, and they must be a type from the Golang standard library (TCPAddr, UDPAddr, etc.) rather than a user-defined type. There's no reason to keep this state other than that http-proxy-lantern is interested in it, and it complains if it doesn't receive a "regular" net.Addr type.
func (QUICStreamNetConn) Close ¶
func (c QUICStreamNetConn) Close() error
func (QUICStreamNetConn) LocalAddr ¶
func (c QUICStreamNetConn) LocalAddr() net.Addr
func (QUICStreamNetConn) RemoteAddr ¶
func (c QUICStreamNetConn) RemoteAddr() net.Addr
type SignalMsg ¶
type SignalMsg struct { ReplyTo string Type SignalMsgType Payload string }
A little confusing: SignalMsg is actually the parent msg which encapsulates an underlying msg, which could be a GenesisMsg, an OfferMsg, a webrtc.SessionDescription (which is currently sent unencapsulated as a SignalMsgAnswer), or a slice of webrtc.ICECandidate (which is currently sent unencapsulated as a SignalMsgICE)
type SignalMsgType ¶
type SignalMsgType int
const ( SignalMsgGenesis SignalMsgType = iota SignalMsgOffer SignalMsgAnswer SignalMsgICE )
func (SignalMsgType) String ¶
func (t SignalMsgType) String() string