func Serve(listener net.Listener, server Server) error {

	if server == nil {
		server = NewServer(nil, nil, 0)
	}

	for {
		conn, err := listener.Accept()
		if err == nil {
			go server.Serve(NewStream(conn, 0))
		} else {
			return err
		}
	}
}
// Serve accepts listeners and hands them over to the server.
Serve accepts listeners and hands them over to the server.
// Serve accepts listeners and hands them over to the server .
func Serve(listener net.Listener, server Server) error {
	if server == nil {
		server = NewServer(nil, nil, 0)
	}
	for {
		conn, err := listener.Accept()
		if err == nil {
			go server.Serve(NewStream(conn, 0))
		} else {
			return err
		}
	}
}
func Serve ( listener net . Listener , server Server ) error { if server == nil { server = NewServer ( nil , nil , 0 ) } for { conn , err := listener . Accept ( ) if err == nil { go server . Serve ( NewStream ( conn , 0 ) ) } else { return err } } }
Serve accepts listeners and hands them over to the server.
Serve accepts listeners and hands them over to the server .