Ejemplo n.º 1
0
func init() {
	netlib.RegisteSessionFilterCreator(ConnectionThrottleFilterName, func() netlib.SessionFilter {
		return &ConnectionThrottleFilter{clients: container.NewSynchronizedMap(), AllowedInterval: DefaultAllowedInterval}
	})
}
Ejemplo n.º 2
0
func (s *Session) init() {
	s.sendBuffer = make(chan interface{}, s.sc.MaxPend)
	s.recvBuffer = make(chan *action, s.sc.MaxDone)
	s.attributes = container.NewSynchronizedMap()
}