// accept the rerouting proposal
760210
func acceptRerouting(peer *Peer, messageId uint64) error {
	message := Message{}
	err := message.
		setCommand(CMD_RP_ACK).
		setContact(Me()).
		send(peer)
	if err != nil {
		Logln("Rerouting Acceptation Failed", err)
		return err
	}
	peer.
		SetState(STATE_STANDBY).
		SetReason("waiting for re-routing")
	Logln("Rerouting acceptance sent.")
	return nil
}
636500
func (l *throttlingListener) Accept() (net.Conn, error) {
	l.pause()
	conn, err := l.Listener.Accept()
	if err == nil {
		l.Lock()
		defer l.Unlock()
		now := l.clk.Now()
		l.connAcceptTimes[l.nextSlot] = &now
		l.nextSlot++
		if l.nextSlot > len(l.connAcceptTimes)-1 {
			l.nextSlot = 0
		}
	}
	return conn, err
}
612165
func (l *gceRateLimiter) Accept(ctx context.Context, key *cloud.RateLimitKey) error {
	if key.Operation == "Get" && key.Service == "Operations" {
		// Wait a minimum amount of time regardless of rate limiter.
		rl := &cloud.MinimumRateLimiter{
			// Convert flowcontrol.RateLimiter into cloud.RateLimiter
			RateLimiter: &cloud.AcceptRateLimiter{
				Acceptor: l.gce.operationPollRateLimiter,
			},
			Minimum: operationPollInterval,
		}
		return rl.Accept(ctx, key)
	}
	return nil
}
649424
func acceptPeering(peer *Peer, messageId uint64) error {
	message := Message{}
	err := message.
		setCommand(CMD_PR_ACK).
		setContact(Me()).
		send(peer)
	if err != nil {
		Logln("Peering Acceptation Failed", err)
		return err
	}
	peer.SetState(STATE_PR_WAIT)
	peer.SetReason("waiting for re-routing")
	Logln("Peering acceptance sent.")
	return nil
}
795278
func (n *SetStmt) Accept(v Visitor) (Node, bool) {
	newNode, skipChildren := v.Enter(n)
	if skipChildren {
		return v.Leave(newNode)
	}
	n = newNode.(*SetStmt)
	for i, val := range n.Variables {
		node, ok := val.Accept(v)
		if !ok {
			return n, false
		}
		n.Variables[i] = node.(*VariableAssignment)
	}
	return v.Leave(n)
}
167520
func (socket *fakeSocket) Accept() (c net.Conn, err error) {
	select {
	case newConnection := <-socket.connections:
		return newConnection, nil
	case <-socket.closed:
		return nil, io.EOF
	}
}
1096455
func (l *listener) Accept() (mangos.Pipe, error) {

	conn, err := l.listener.Accept()
	if err != nil {
		return nil, err
	}
	addr := pipeAddr(l.path)
	return mangos.NewConnPipeIPC(conn, l.sock,
		mangos.PropLocalAddr, addr, mangos.PropRemoteAddr, addr)
}
261420
func (l UIDListener) Accept() (c net.Conn, err error) {
	nc, err := l.nl.AcceptUnix()
	if err != nil {
		return nil, err
	}
	return UIDConnection{nc}, nil
}
891430
func (s *NetServer) Accept() (Conn, error) {
	// ensure write delay default
	if s.MaxWriteDelay == 0 {
		s.MaxWriteDelay = 10 * time.Millisecond
	}

	conn, err := s.listener.Accept()
	if err != nil {
		return nil, err
	}

	return NewNetConn(conn, s.MaxWriteDelay), nil
}
517400
func (s *contivListener) Accept() (net.Conn, error) {
	s.incrementRef()
	defer s.decrementRef()
	return s.Listener.Accept()
}
871011
func (listen *StopListener) Accept() (net.Conn, error) {
	conn, err := listen.TCPListener.Accept()
	if !listen.active {
		return nil, StopRequestError{} // ### return, stop requested ###
	}
	if err != nil {
		return nil, err // ### return, error ###
	}

	return conn, err
}
214383
func acceptConnection(listener net.Listener, listen chan<- net.Conn) {
	for {
		conn, err := listener.Accept()
		if err != nil {
			continue
		}
		listen <- conn
	}
}
465383
func (acceptNew) Accept(from interface{}) bool {
	_, meta, err := objectMetaData(from)
	if err != nil {
		return false
	}
	if len(meta.GetResourceVersion()) > 0 {
		return false
	}
	return true
}
164088
func (ln TCPKeepAliveListener) Accept() (c net.Conn, err error) {
	for {
		ln.SetDeadline(time.Now().Add(time.Second))
		select {
		case <-ln.cancel:
			return nil, errors.New("port closed")
		default:
		}

		conn, err := ln.AcceptTCP()
		if err != nil {
			switch err := err.(type) {
			case net.Error:
				if err.Timeout() {
					continue
				}
			}
			return nil, err
		}
		conn.SetKeepAlive(true)
		conn.SetKeepAlivePeriod(3 * time.Minute)

		// and return the connection.
		return conn, nil
	}
}
4948
func (l *maListener) Accept() (Conn, error) {
	nconn, err := l.Listener.Accept()
	if err != nil {
		return nil, err
	}

	var raddr ma.Multiaddr
	// This block protects us in transports (i.e. unix sockets) that don't have
	// remote addresses for inbound connections.
	if nconn.RemoteAddr().String() != "" {
		raddr, err = FromNetAddr(nconn.RemoteAddr())
		if err != nil {
			return nil, fmt.Errorf("failed to convert conn.RemoteAddr: %s", err)
		}
	}

	return wrap(nconn, l.laddr, raddr), nil
}
760180
func refuseRerouting(peer *Peer, messageId uint64, reason string) error {
	message := Message{}
	err := message.
		setCommand(CMD_RP_NAK).
		setContact(Me()).
		setReason(reason).
		send(peer)
	if err != nil {
		Logln("Rerouting refusal failed", err)
		return err
	}
	peer.
		SetState(STATE_STANDBY).
		SetReason(reason)
	Logln("Rerouting refusal sent.")
	return nil
}
300371
func (api *API) Propose(address common.Address, auth bool) {
	api.clique.lock.Lock()
	defer api.clique.lock.Unlock()

	api.clique.proposals[address] = auth
}