src/Socket.h
branchv_0
changeset 5 e57e2a2798b2
parent 4 8d036e5e5fcc
child 7 e6f005f3edfe
--- a/src/Socket.h	Fri Jul 29 18:03:49 2022 +0200
+++ b/src/Socket.h	Sat Jul 30 00:16:40 2022 +0200
@@ -17,6 +17,7 @@
 #pragma once
 
 #include <string>
+#include <vector>
 #include <cstring>
 #include <unistd.h>
 #include <stdexcept>
@@ -47,12 +48,14 @@
 	virtual ~SocketOption() = default;
 };
 
+using SocketOptions = std::vector<SocketOption>;
+
 class SocketFactory {
 public:
 	virtual ~SocketFactory() = default;
-	virtual bool canHandle(const std::string& connectionString) = 0;
-	virtual std::shared_ptr<Socket> open(const std::string& connectionString) = 0;
-	static std::shared_ptr<SocketFactory> find(const std::string& connectionString);
+	virtual bool canHandle(const SocketOptions& options) = 0;
+	virtual std::shared_ptr<Socket> open(const SocketOptions& options) = 0;
+	static std::shared_ptr<SocketFactory> find(const SocketOptions& options);
 };