示例#1
0
文件: subscr.go 项目: ikravets/ev
func (s *Subscr) Unsubscribe(oid packet.OptionId) {
	errs.Check(oid.Valid(), "unsubscribing from invalid option", oid)
	delete(s.subscriptions, oid)
}
示例#2
0
文件: subscr.go 项目: ikravets/ev
func (s *Subscr) Subscribe(oid packet.OptionId) {
	errs.Check(oid.Valid(), "subscribing to invalid option", oid)
	s.subscriptions[oid] = struct{}{}
	s.autoSubscribe = false
}