diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index 308a15d..1e8f90b 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -53,10 +53,10 @@
 }
 
 void
-SyncLogicHandler::createSyncSocket(const ndn::Name& syncPrefix, const ndn::time::milliseconds& syncInterestLifetime)
+SyncLogicHandler::createSyncLogic(const ndn::Name& syncPrefix, const ndn::time::milliseconds& syncInterestLifetime)
 {
-  if (m_syncSocket != nullptr) {
-    NLSR_LOG_WARN("Trying to create Sync socket, but Sync socket already exists");
+  if (m_syncLogic != nullptr) {
+    NLSR_LOG_WARN("Trying to create Sync Logic object, but Sync Logic object already exists");
     return;
   }
 
@@ -65,27 +65,34 @@
   // Build LSA sync update prefix
   buildUpdatePrefix();
 
-  NLSR_LOG_DEBUG("Creating Sync socket. Sync Prefix: " << m_syncPrefix);
+  NLSR_LOG_DEBUG("Creating Sync Logic object. Sync Prefix: " << m_syncPrefix);
 
-  // The face's lifetime is managed in main.cpp; SyncSocket should not manage the memory
+  // The face's lifetime is managed in main.cpp; Logic should not manage the memory
   // of the object
   std::shared_ptr<ndn::Face> facePtr(&m_syncFace, NullDeleter<ndn::Face>());
 
   const auto fixedSession = ndn::name::Component::fromNumber(0);
-  m_syncSocket = std::make_shared<chronosync::Socket>(m_syncPrefix, m_nameLsaUserPrefix, *facePtr,
-                                                      std::bind(&SyncLogicHandler::onChronoSyncUpdate, this, _1),
-                                                      chronosync::Socket::DEFAULT_NAME, chronosync::Socket::DEFAULT_VALIDATOR,
-                                                      syncInterestLifetime, fixedSession);
+  m_syncLogic = std::make_shared<chronosync::Logic>(*facePtr, m_syncPrefix, m_nameLsaUserPrefix,
+                                                     std::bind(&SyncLogicHandler::onChronoSyncUpdate, this, _1),
+                                                     chronosync::Logic::DEFAULT_NAME,
+                                                     chronosync::Logic::DEFAULT_VALIDATOR,
+                                                     chronosync::Logic::DEFAULT_RESET_TIMER,
+                                                     chronosync::Logic::DEFAULT_CANCEL_RESET_TIMER,
+                                                     chronosync::Logic::DEFAULT_RESET_INTEREST_LIFETIME,
+                                                     syncInterestLifetime,
+                                                     chronosync::Logic::DEFAULT_SYNC_REPLY_FRESHNESS,
+                                                     chronosync::Logic::DEFAULT_RECOVERY_INTEREST_LIFETIME,
+                                                     fixedSession);
 
   if (m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
-    m_syncSocket->addSyncNode(m_adjLsaUserPrefix, chronosync::Socket::DEFAULT_NAME, fixedSession);
+    m_syncLogic->addUserNode(m_adjLsaUserPrefix, chronosync::Logic::DEFAULT_NAME, fixedSession);
   }
   else if (m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_ON) {
-    m_syncSocket->addSyncNode(m_coorLsaUserPrefix, chronosync::Socket::DEFAULT_NAME, fixedSession);
+    m_syncLogic->addUserNode(m_coorLsaUserPrefix, chronosync::Logic::DEFAULT_NAME, fixedSession);
   }
   else {
-    m_syncSocket->addSyncNode(m_adjLsaUserPrefix, chronosync::Socket::DEFAULT_NAME, fixedSession);
-    m_syncSocket->addSyncNode(m_coorLsaUserPrefix, chronosync::Socket::DEFAULT_NAME, fixedSession);
+    m_syncLogic->addUserNode(m_adjLsaUserPrefix, chronosync::Logic::DEFAULT_NAME, fixedSession);
+    m_syncLogic->addUserNode(m_coorLsaUserPrefix, chronosync::Logic::DEFAULT_NAME, fixedSession);
   }
 }
 
@@ -154,21 +161,21 @@
 void
 SyncLogicHandler::publishRoutingUpdate(const Lsa::Type& type, const uint64_t& seqNo)
 {
-  if (m_syncSocket == nullptr) {
-    NLSR_LOG_FATAL("Cannot publish routing update; SyncSocket does not exist");
+  if (m_syncLogic == nullptr) {
+    NLSR_LOG_FATAL("Cannot publish routing update; SyncLogic does not exist");
 
-    BOOST_THROW_EXCEPTION(SyncLogicHandler::Error("Cannot publish routing update; SyncSocket does not exist"));
+    BOOST_THROW_EXCEPTION(SyncLogicHandler::Error("Cannot publish routing update; SyncLogic does not exist"));
   }
 
   switch (type) {
   case Lsa::Type::ADJACENCY:
-    publishSyncUpdate(m_adjLsaUserPrefix, seqNo);
+    m_syncLogic->updateSeqNo(seqNo, m_adjLsaUserPrefix);
     break;
   case Lsa::Type::COORDINATE:
-    publishSyncUpdate(m_coorLsaUserPrefix, seqNo);
+    m_syncLogic->updateSeqNo(seqNo, m_coorLsaUserPrefix);
     break;
   case Lsa::Type::NAME:
-    publishSyncUpdate(m_nameLsaUserPrefix, seqNo);
+    m_syncLogic->updateSeqNo(seqNo, m_nameLsaUserPrefix);
     break;
   default:
     break;
@@ -192,16 +199,4 @@
   m_coorLsaUserPrefix.append(std::to_string(Lsa::Type::COORDINATE));
 }
 
-void
-SyncLogicHandler::publishSyncUpdate(const ndn::Name& updatePrefix, uint64_t seqNo)
-{
-  NLSR_LOG_DEBUG("Publishing Sync Update. Prefix: " << updatePrefix << " Seq No: " << seqNo);
-
-  ndn::Name updateName(updatePrefix);
-  std::string data("NoData");
-
-  m_syncSocket->publishData(reinterpret_cast<const uint8_t*>(data.c_str()), data.size(),
-                            ndn::time::milliseconds(1000), seqNo, updateName);
-}
-
 } // namespace nlsr
diff --git a/src/communication/sync-logic-handler.hpp b/src/communication/sync-logic-handler.hpp
index f4bd31a..8be327c 100644
--- a/src/communication/sync-logic-handler.hpp
+++ b/src/communication/sync-logic-handler.hpp
@@ -29,7 +29,7 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/util/signal.hpp>
-#include <ChronoSync/socket.hpp>
+#include <ChronoSync/logic.hpp>
 #include <boost/throw_exception.hpp>
 
 class InterestManager;
@@ -87,7 +87,7 @@
   void
   publishRoutingUpdate(const Lsa::Type& type, const uint64_t& seqNo);
 
-  /*! \brief Create and configure a socket to enable ChronoSync for this NLSR.
+  /*! \brief Create and configure a Logic object to enable ChronoSync for this NLSR.
    *
    * In a typical situation this only needs to be called once, when NLSR starts.
    * \param syncPrefix The sync prefix you want this ChronoSync to use
@@ -95,9 +95,9 @@
    * \sa Nlsr::initialize
    */
   void
-  createSyncSocket(const ndn::Name& syncPrefix,
-                   const ndn::time::milliseconds& syncInterestLifetime =
-                     ndn::time::milliseconds(SYNC_INTEREST_LIFETIME_DEFAULT));
+  createSyncLogic(const ndn::Name& syncPrefix,
+                  const ndn::time::milliseconds& syncInterestLifetime =
+                    ndn::time::milliseconds(SYNC_INTEREST_LIFETIME_DEFAULT));
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   /*! \brief Simple function to glue Name components together
@@ -118,21 +118,12 @@
   processUpdateFromSync(const ndn::Name& originRouter,
                         const ndn::Name& updateName, const uint64_t& seqNo);
 
-  /*! \brief Instruct ChronoSync, via the sync socket, to publish an update.
-   *
-   * Each ChronoSync instance maintains its own PIT for sync
-   * updates. This function creates a data that satisfies that update,
-   * so that the interested routers will know new data is available.
-   */
-  void
-  publishSyncUpdate(const ndn::Name& updatePrefix, uint64_t seqNo);
-
 public:
   std::unique_ptr<OnNewLsa> onNewLsa;
 
 private:
   ndn::Face& m_syncFace;
-  std::shared_ptr<chronosync::Socket> m_syncSocket;
+  std::shared_ptr<chronosync::Logic> m_syncLogic;
   ndn::Name m_syncPrefix;
   IsLsaNew m_isLsaNew;
   const ConfParameter& m_confParam;
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 58d4441..2823a74 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -260,8 +260,8 @@
   m_nlsrLsdb.getSequencingManager().setSeqFileDirectory(m_confParam.getSeqFileDir());
   m_nlsrLsdb.getSequencingManager().initiateSeqNoFromFile(m_confParam.getHyperbolicState());
 
-  m_nlsrLsdb.getSyncLogicHandler().createSyncSocket(m_confParam.getChronosyncPrefix(),
-                                                    m_confParam.getSyncInterestLifetime());
+  m_nlsrLsdb.getSyncLogicHandler().createSyncLogic(m_confParam.getChronosyncPrefix(),
+                                                   m_confParam.getSyncInterestLifetime());
 
   // Logging start
   m_confParam.writeLog();
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index 9f8192e..ab9732d 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -99,7 +99,7 @@
 BOOST_AUTO_TEST_CASE(UpdateForOtherLS)
 {
   SyncLogicHandler sync{face, testIsLsaNew, conf};
-  sync.createSyncSocket(conf.getChronosyncPrefix());
+  sync.createSyncLogic(conf.getChronosyncPrefix());
 
   std::vector<Lsa::Type> lsaTypes = {Lsa::Type::NAME, Lsa::Type::ADJACENCY};
 
@@ -129,7 +129,7 @@
   conf.setHyperbolicState(HYPERBOLIC_STATE_ON);
 
   SyncLogicHandler sync{face, testIsLsaNew, conf};
-  sync.createSyncSocket(conf.getChronosyncPrefix());
+  sync.createSyncLogic(conf.getChronosyncPrefix());
 
   uint64_t syncSeqNo = 1;
   std::vector<Lsa::Type> lsaTypes = {Lsa::Type::NAME, Lsa::Type::COORDINATE};
@@ -157,7 +157,7 @@
   conf.setHyperbolicState(HYPERBOLIC_STATE_DRY_RUN);
 
   SyncLogicHandler sync{face, testIsLsaNew, conf};
-  sync.createSyncSocket(conf.getChronosyncPrefix());
+  sync.createSyncLogic(conf.getChronosyncPrefix());
 
   for (const Lsa::Type& lsaType : lsaTypes) {
     uint64_t syncSeqNo = 1;
@@ -184,7 +184,7 @@
   const uint64_t sequenceNumber = 1;
 
   SyncLogicHandler sync{face, testIsLsaNew, conf};
-  sync.createSyncSocket(conf.getChronosyncPrefix());
+  sync.createSyncLogic(conf.getChronosyncPrefix());
 
   for (const Lsa::Type& lsaType : lsaTypes) {
     // To ensure that we get correctly-separated components, create
@@ -210,7 +210,7 @@
   const uint64_t sequenceNumber = 1;
 
   SyncLogicHandler sync{face, testIsLsaNew, conf};
-  sync.createSyncSocket(conf.getChronosyncPrefix());
+  sync.createSyncLogic(conf.getChronosyncPrefix());
 
   for (const Lsa::Type& lsaType : lsaTypes) {
     ndn::Name updateName{CONFIG_SITE};
@@ -238,7 +238,7 @@
 
   const uint64_t sequenceNumber = 1;
   SyncLogicHandler sync{face, testLsaAlwaysFalse, conf};
-  sync.createSyncSocket(conf.getChronosyncPrefix());
+  sync.createSyncLogic(conf.getChronosyncPrefix());
     ndn::util::signal::ScopedConnection connection = sync.onNewLsa->connect(
       [&] (const ndn::Name& routerName, const uint64_t& sequenceNumber) {
         BOOST_FAIL("An update for an LSA with non-new sequence number should not emit!");
@@ -281,7 +281,7 @@
    NB: This test is as much an Nlsr class test as a
    SyncLogicHandler class test, but it rides the line and ends up here.
  */
-BOOST_AUTO_TEST_CASE(CreateSyncSocketOnInitialization) // Bug #2649
+BOOST_AUTO_TEST_CASE(createSyncLogicOnInitialization) // Bug #2649
 {
   nlsr.initialize();
 
