// SSIDConnections retrieves the list of child SSIDConnections of the WirelessPort
321504
func (o *WirelessPort) SSIDConnections(info *bambou.FetchingInfo) (SSIDConnectionsList, *bambou.Error) {

	var list SSIDConnectionsList
	err := bambou.CurrentSession().FetchChildren(o, SSIDConnectionIdentity, &list, info)
	return list, err
}
1048350
func NetworkRestGetConnections(context *gin.Context) {
	body, err := network.ServiceGetConnections()
	util.RestHandleResponse(context, body, err)
}
37578
func (o *Subnet) AssignIKEGatewayConnections(children IKEGatewayConnectionsList) *bambou.Error {

	list := []bambou.Identifiable{}
	for _, c := range children {
		list = append(list, c)
	}

	return bambou.CurrentSession().AssignChildren(o, list, IKEGatewayConnectionIdentity)
}
577488
func Connections(n int) func(*Attacker) {
	return func(a *Attacker) {
		tr := a.client.Transport.(*http.Transport)
		tr.MaxIdleConnsPerHost = n
	}
}
611924
func (o *WirelessPort) CreateSSIDConnection(child *SSIDConnection) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
253024
func (s *Connection) SetConnectionProperties(v map[string]*string) *Connection {
	s.ConnectionProperties = v
	return s
}
334965
func (n *switchingNetworking) NetworkInterfaces(instId instance.Id) ([]network.InterfaceInfo, error) {
	if err := n.initNetworking(); err != nil {
		return nil, errors.Trace(err)
	}
	return n.networking.NetworkInterfaces(instId)
}
1201817
func (c *connectionTracker) AddConnection(conn net.Conn) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.conns[conn] = struct{}{}
}
508633
func (o *VLANTemplate) UplinkConnections(info *bambou.FetchingInfo) (UplinkConnectionsList, *bambou.Error) {

	var list UplinkConnectionsList
	err := bambou.CurrentSession().FetchChildren(o, UplinkConnectionIdentity, &list, info)
	return list, err
}
740609
func (s *Service) NetworkConnect(ctx context.Context, c *container.Container, net *yaml.Network, oneOff bool) error {
	containerID := c.ID()
	client := s.clientFactory.Create(s)
	internalLinks, err := s.getLinks()
	if err != nil {
		return err
	}
	links := []string{}
	// TODO(vdemeester) handle link to self (?)
	for k, v := range internalLinks {
		links = append(links, strings.Join([]string{v, k}, ":"))
	}
	for _, v := range s.serviceConfig.ExternalLinks {
		links = append(links, v)
	}
	aliases := []string{}
	if !oneOff {
		aliases = []string{s.Name()}
	}
	aliases = append(aliases, net.Aliases...)
	if len(net.Aliases) >= 1 {
		logrus.Infof("connect")
		client.NetworkConnect(ctx, net.RealName, containerID, &network.EndpointSettings{
			Aliases:   aliases,
			Links:     links,
			IPAddress: net.IPv4Address,
			IPAMConfig: &network.EndpointIPAMConfig{
				IPv4Address: net.IPv4Address,
				IPv6Address: net.IPv6Address,
			},
		})
		logrus.Infof("disconnect")
		client.NetworkDisconnect(ctx, net.RealName, containerID, true)
	}
	return client.NetworkConnect(ctx, net.RealName, containerID, &network.EndpointSettings{
		Aliases:   aliases,
		Links:     links,
		IPAddress: net.IPv4Address,
		IPAMConfig: &network.EndpointIPAMConfig{
			IPv4Address: net.IPv4Address,
			IPv6Address: net.IPv6Address,
		},
	})
}
515785
func (s *DescribeConnectionsOutput) SetConnections(v []*Connection) *DescribeConnectionsOutput {
	s.Connections = v
	return s
}
684849
func (a *Account) MaxActiveConnections() int {
	a.mu.RLock()
	mconns := int(a.mconns)
	a.mu.RUnlock()
	return mconns
}
965820
func (s *Lag) SetConnectionsBandwidth(v string) *Lag {
	s.ConnectionsBandwidth = &v
	return s
}
1308381
func (m *MobileGateway) InternetConnection() bool {
	return m.HasSetting() &&
		m.Settings.MobileGateway.InternetConnection != nil &&
		m.Settings.MobileGateway.InternetConnection.Enabled == "True"
}
480760
func ShutdownConnections() {
	managerLock.Lock()
	defer managerLock.Unlock()
	for _, client := range manager {
		client.Shutdown()
	}
}
359707
func (s *Server) GetTotalConnections() (n int) {
	s.connections.Range(func(k, v interface{}) bool {
		n++
		return true
	})

	return n
}
1282277
func (s *PresenceService) GetTunnelConnections(clusterName string, opts ...services.MarshalOption) ([]services.TunnelConnection, error) {
	if clusterName == "" {
		return nil, trace.BadParameter("missing cluster name")
	}
	startKey := backend.Key(tunnelConnectionsPrefix, clusterName)
	result, err := s.GetRange(context.TODO(), startKey, backend.RangeEnd(startKey), backend.NoLimit)
	if err != nil {
		return nil, trace.Wrap(err)
	}
	conns := make([]services.TunnelConnection, len(result.Items))
	for i, item := range result.Items {
		conn, err := services.UnmarshalTunnelConnection(item.Value,
			services.AddOptions(opts, services.WithResourceID(item.ID), services.WithExpires(item.Expires))...)
		if err != nil {
			return nil, trace.Wrap(err)
		}
		conns[i] = conn
	}

	return conns, nil
}