Skip to content
Snippets Groups Projects
p2prm.cpp 555 B
Newer Older
#include "ftl/p2p-rm.hpp"
#include "ftl/p2p-rm/blob.hpp"
#include "ftl/p2p-rm/protocol.hpp"

#include <ftl/uri.hpp>
#include <ftl/net.hpp>

#include <map>
#include <string>
using std::shared_ptr;
using ftl::rm::Cluster;
using ftl::URI;
using ftl::net::Listener;
shared_ptr<Cluster> ftl::rm::cluster(const char *uri, shared_ptr<Listener> l) {
	if (!u.isValid()) return nullptr;
	if (u.getScheme() != ftl::URI::SCHEME_FTL) return nullptr;
	if (u.getPath().size() > 0) return nullptr;
	shared_ptr<Cluster> c(new Cluster(u, l));
	return c;