summaryrefslogtreecommitdiffstats
path: root/src/socket/ingen_socket_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket/ingen_socket_client.cpp')
-rw-r--r--src/socket/ingen_socket_client.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/socket/ingen_socket_client.cpp b/src/socket/ingen_socket_client.cpp
index 4dd8a491..61a175d4 100644
--- a/src/socket/ingen_socket_client.cpp
+++ b/src/socket/ingen_socket_client.cpp
@@ -19,19 +19,25 @@
#include "ingen/Log.hpp"
#include "ingen/Module.hpp"
#include "ingen/World.hpp"
+#include "raul/Socket.hpp"
-#include "Socket.hpp"
#include "SocketClient.hpp"
namespace Ingen {
namespace Socket {
+static Raul::Socket::Type type_from_uri(const Raul::URI uri) {
+ return (uri.scheme() == "unix")
+ ? Raul::Socket::Type::UNIX
+ : Raul::Socket::Type::TCP;
+}
+
static SPtr<Ingen::Interface>
new_socket_interface(Ingen::World* world,
const Raul::URI& uri,
SPtr<Ingen::Interface> respondee)
{
- SPtr<Socket> sock(new Socket(Socket::type_from_uri(uri)));
+ SPtr<Raul::Socket> sock(new Raul::Socket(type_from_uri(uri)));
if (!sock->connect(uri)) {
world->log().error(fmt("Failed to connect <%1%> (%2%)\n")
% sock->uri() % strerror(errno));