aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/remote-store.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/remote-store.hh')
-rw-r--r--src/libstore/remote-store.hh22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh
index f15182285..b16a6b51d 100644
--- a/src/libstore/remote-store.hh
+++ b/src/libstore/remote-store.hh
@@ -12,6 +12,7 @@ class Pipe;
class Pid;
struct FdSink;
struct FdSource;
+template<typename T> class Pool;
class RemoteStore : public Store
@@ -91,19 +92,22 @@ public:
bool verifyStore(bool checkContents, bool repair) override;
private:
- AutoCloseFD fdSocket;
- FdSink to;
- FdSource from;
- unsigned int daemonVersion;
- bool initialised;
- void openConnection(bool reserveSpace = true);
+ struct Connection
+ {
+ AutoCloseFD fd;
+ FdSink to;
+ FdSource from;
+ unsigned int daemonVersion;
- void processStderr(Sink * sink = 0, Source * source = 0);
+ void processStderr(Sink * sink = 0, Source * source = 0);
+ };
- void connectToDaemon();
+ ref<Pool<Connection>> connections;
- void setOptions();
+ ref<Connection> openConnection(bool reserveSpace = true);
+
+ void setOptions(ref<Connection> conn);
};