func (s *Server) ConnectionWithString(srvaddr string) error {
	srvAddr, err := net.ResolveTCPAddr("tcp", srvaddr)
	if err != nil {
		return err
	}

	el := s.svr.lb.next(srvAddr)

	nfd, sa, remoteaddr, err := reuseport.TCPSocketConnect("tcp", srvaddr, false)
	if err != nil {
		return err
	}

	localAddr := sockaddrnet.SockaddrToTCPAddr(sa)

	// ln.fd, ln.lnaddr, err = reuseport.TCPSocketConnect(el.ln.network, el.ln.addr, el.ln.reusePort)
	// netAddr := netpoll.SockaddrToTCPOrUnixAddr(sa)
	// lsa, _ = syscall.Getsockname(nfd)
	// localAddr := netpoll.SockaddrToTCPOrUnixAddr(lsa)

	//TODO Local address isn't set!
	// c := newTCPConn(nfd, el, sa, remoteaddr, &net.TCPAddr{})

	c := &conn{
		fd:             nfd,
		sa:             sa,
		loop:           el,
		codec:          el.svr.codec,
		localAddr:      localAddr,
		remoteAddr:     remoteaddr,
		inboundBuffer:  ringbuffer.Get(),
		outboundBuffer: ringbuffer.Get(),
	}

	c.pollAttachment = netpoll.GetPollAttachment()
	c.pollAttachment.FD, c.pollAttachment.Callback = nfd, c.handleEvents

	//Notify connected!
	// el.eventHandler.OnOpened(c)

	// _ = el.poller.Trigger(func() (err error) {
	// 	if err = el.poller.AddRead(nfd); err != nil {
	// 		return
	// 	}
	// 	el.connections[nfd] = c
	// 	err = el.loopOpen(c)
	// 	return
	// })

	err = el.poller.UrgentTrigger(el.loopRegister, c)
	if err != nil {
		_ = unix.Close(nfd)
		c.releaseTCP()
	}
	return nil
}
//Register's an existing TCPConnection
Register's an existing TCPConnection
// Register ' s an existing TCPConnection
func (s *Server) ConnectionWithString(srvaddr string) error {
	srvAddr, err := net.ResolveTCPAddr("tcp", srvaddr)
	if err != nil {
		return err
	}
	el := s.svr.lb.next(srvAddr)
	nfd, sa, remoteaddr, err := reuseport.TCPSocketConnect("tcp", srvaddr, false)
	if err != nil {
		return err
	}
	localAddr := sockaddrnet.SockaddrToTCPAddr(sa)
	c := &conn{
		fd:             nfd,
		sa:             sa,
		loop:           el,
		codec:          el.svr.codec,
		localAddr:      localAddr,
		remoteAddr:     remoteaddr,
		inboundBuffer:  ringbuffer.Get(),
		outboundBuffer: ringbuffer.Get(),
	}
	c.pollAttachment = netpoll.GetPollAttachment()
	c.pollAttachment.FD, c.pollAttachment.Callback = nfd, c.handleEvents
	err = el.poller.UrgentTrigger(el.loopRegister, c)
	if err != nil {
		_ = unix.Close(nfd)
		c.releaseTCP()
	}
	return nil
}
func ( s * Server ) ConnectionWithString ( srvaddr string ) error { srvAddr , err := net . ResolveTCPAddr ( " " , srvaddr ) if err != nil { return err } el := s . svr . lb . next ( srvAddr ) nfd , sa , remoteaddr , err := reuseport . TCPSocketConnect ( " " , srvaddr , false ) if err != nil { return err } localAddr := sockaddrnet . SockaddrToTCPAddr ( sa ) c := & conn { fd : nfd , sa : sa , loop : el , codec : el . svr . codec , localAddr : localAddr , remoteAddr : remoteaddr , inboundBuffer : ringbuffer . Get ( ) , outboundBuffer : ringbuffer . Get ( ) , } c . pollAttachment = netpoll . GetPollAttachment ( ) c . pollAttachment . FD , c . pollAttachment . Callback = nfd , c . handleEvents err = el . poller . UrgentTrigger ( el . loopRegister , c ) if err != nil { _ = unix . Close ( nfd ) c . releaseTCP ( ) } return nil }
Register's an existing TCPConnection
Register ' s an existing TCPConnection
// ln.fd, ln.lnaddr, err = reuseport.TCPSocketConnect(el.ln.network, el.ln.addr, el.ln.reusePort) // netAddr := netpoll.SockaddrToTCPOrUnixAddr(sa) // lsa, _ = syscall.Getsockname(nfd) // localAddr := netpoll.SockaddrToTCPOrUnixAddr(lsa) //TODO Local address isn't set! // c := newTCPConn(nfd, el, sa, remoteaddr, &net.TCPAddr{}) //Notify connected! // el.eventHandler.OnOpened(c) // _ = el.poller.Trigger(func() (err error) { // 	if err = el.poller.AddRead(nfd); err != nil { // 		return // 	} // 	el.connections[nfd] = c // 	err = el.loopOpen(c) // 	return // })