Exemple #1
0
func NewGapProxyConn(conn net.Conn, gmc *batsGapMcastServer) *gapProxyConn {
	return &gapProxyConn{
		conn:  conn,
		bconn: bats.NewConn(conn),
		gmc:   gmc,
	}
}
Exemple #2
0
func (g *batsGapMcastServer) start(num int) (err error) {
	g.conn, err = net.DialUDP("udp", g.laddr, g.mcaddr)
	errs.CheckE(err)
	bconn := bats.NewConn(g.conn)
	g.pw = bconn.GetPacketWriterUnsync()
	go g.run()
	return
}
Exemple #3
0
func (s *batsFeedMcastServer) start(num int) (err error) {
	s.conn, err = net.DialUDP("udp", s.laddr, s.mcaddr)
	errs.CheckE(err)
	bconn := bats.NewConn(s.conn)
	s.pw = bconn.GetPacketWriterUnsync()
	s.bmsc = s.src.NewClient()
	go s.run()
	return
}
Exemple #4
0
func NewSpinServerConn(conn net.Conn, src *batsMessageSource) *spinServerConn {
	return &spinServerConn{
		conn:            conn,
		bconn:           bats.NewConn(conn),
		src:             src,
		imageLag:        10,
		mcastDuringSpin: 10,
	}
}