face+security: Introduce environment variables to set/override transport, pib, and tpm configurations.
- NDN_CLIENT_TRANSPORT: equivalent of transport in client.conf
- NDN_CLIENT_PIB: equivalent of pib in client.conf
- NDN_CLIENT_TPM: equivalent of tpm in client.conf
Whenever an environment variable is set, it takes precedence over any
values specified in the configuration file.
Change-Id: I44c2347168616387a0489b6bf5c2c3a12db29863
Refs: #2925, #2514
diff --git a/src/transport/tcp-transport.hpp b/src/transport/tcp-transport.hpp
index 0ddd1a9..b0b5124 100644
--- a/src/transport/tcp-transport.hpp
+++ b/src/transport/tcp-transport.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -62,13 +62,18 @@
virtual void
send(const Block& header, const Block& payload);
+ /**
+ * @brief Create transport with parameters defined in URI
+ *
+ * @throws Transport::Error if incorrect URI or unsupported protocol is specified
+ */
static shared_ptr<TcpTransport>
- create(const ConfigFile& config);
+ create(const std::string& uri);
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
static std::pair<std::string, std::string>
- getDefaultSocketHostAndPort(const ConfigFile& config);
+ getSocketHostAndPortFromUri(const std::string& uri);
private:
std::string m_host;