Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / mc / remote / Channel.hpp
index da1f649..c9e1aeb 100644 (file)
@@ -22,6 +22,7 @@ class Channel {
   template <class M> static constexpr bool messageType() { return std::is_class_v<M> && std::is_trivial_v<M>; }
 
 public:
+  Channel() = default;
   explicit Channel(int sock) : socket_(sock) {}
   ~Channel();
 
@@ -49,7 +50,9 @@ public:
     return this->receive(&m, sizeof(M));
   }
 
+  // Socket handling
   int get_socket() const { return socket_; }
+  void reset_socket(int socket) { socket_ = socket; }
 };
 } // namespace simgrid::mc