func acceptConnection(listener net.Listener, listen chan<- net.Conn) {
    for {
        conn, err := listener.Accept()
        if err != nil {
            continue
        }
        listen <- conn
    }
}
// Accept a client connection and collect it in a channel
Accept a client connection and collect it in a channel
// Accept a client connection and collect it in a channel
func acceptConnection(listener net.Listener, listen chan<- net.Conn) {
    for {
        conn, err := listener.Accept()
        if err != nil {
            continue
        }
        listen <- conn
    }
}
func acceptConnection ( listener net . Listener , listen chan <- net . Conn ) { for { conn , err := listener . Accept ( ) if err != nil { continue } listen <- conn } }
Accept a client connection and collect it in a channel
Accept a client connection and collect it in a channel