Skip to content

Commit

Permalink
Missing utils.go file
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiraux committed Feb 8, 2019
1 parent f826d80 commit 30f5cc0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions utils.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package quictracker

import "github.com/dustin/go-broadcast"

type Broadcaster struct {
broadcast.Broadcaster
}

func NewBroadcaster(buflen int) Broadcaster {
return Broadcaster{broadcast.NewBroadcaster(buflen)}
}

func (b *Broadcaster) RegisterNewChan(size int) chan interface{} {
c := make(chan interface{}, size)
b.Register(c)
return c
}

0 comments on commit 30f5cc0

Please sign in to comment.