func (al *acceptLink) Link(reason error) (net.Conn, *bufio.Reader, SeqNo, error) {
	al.link__.Lock()
	defer al.link__.Unlock()
	if al.carrier != nil {
		al.carrier.Close()
	}
	for {
		replaceWith, ok := <-al.ach
		if !ok {
			return nil, nil, 0, io.ErrUnexpectedEOF
		}
		if replaceWith.SeqNo > al.seqno {
			al.seqno = replaceWith.SeqNo
			al.carrier = replaceWith.Carrier
			//al.Conn.frame.Printf("ACCEPTED #%d", al.seqno)
			return al.carrier, replaceWith.R, al.seqno, nil
		}
		al.Conn.frame.Printf("out-of-order redial #%d arrived while using #%d", replaceWith.SeqNo, al.seqno)
		replaceWith.Carrier.Close()
	}
	panic("u")
}
// Link blocks until a new connection to the remote endpoint is passed through Accept or Kill is invoked.
Link blocks until a new connection to the remote endpoint is passed through Accept or Kill is invoked.
// Link blocks until a new connection to the remote endpoint is passed through Accept or Kill is invoked .
func (al *acceptLink) Link(reason error) (net.Conn, *bufio.Reader, SeqNo, error) {
	al.link__.Lock()
	defer al.link__.Unlock()
	if al.carrier != nil {
		al.carrier.Close()
	}
	for {
		replaceWith, ok := <-al.ach
		if !ok {
			return nil, nil, 0, io.ErrUnexpectedEOF
		}
		if replaceWith.SeqNo > al.seqno {
			al.seqno = replaceWith.SeqNo
			al.carrier = replaceWith.Carrier
			return al.carrier, replaceWith.R, al.seqno, nil
		}
		al.Conn.frame.Printf("out-of-order redial #%d arrived while using #%d", replaceWith.SeqNo, al.seqno)
		replaceWith.Carrier.Close()
	}
	panic("u")
}
func ( al * acceptLink ) Link ( reason error ) ( net . Conn , * bufio . Reader , SeqNo , error ) { al . link__ . Lock ( ) defer al . link__ . Unlock ( ) if al . carrier != nil { al . carrier . Close ( ) } for { replaceWith , ok := <- al . ach if ! ok { return nil , nil , 0 , io . ErrUnexpectedEOF } if replaceWith . SeqNo > al . seqno { al . seqno = replaceWith . SeqNo al . carrier = replaceWith . Carrier return al . carrier , replaceWith . R , al . seqno , nil } al . Conn . frame . Printf ( " " , replaceWith . SeqNo , al . seqno ) replaceWith . Carrier . Close ( ) } panic ( " " ) }
Link blocks until a new connection to the remote endpoint is passed through Accept or Kill is invoked.
Link blocks until a new connection to the remote endpoint is passed through Accept or Kill is invoked .
//al.Conn.frame.Printf("ACCEPTED #%d", al.seqno)