summaryrefslogtreecommitdiffstats
path: root/src/socket/ingen_socket_client.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-23 21:23:16 +0000
committerDavid Robillard <d@drobilla.net>2013-02-23 21:23:16 +0000
commit400bbe503f44d306f5488eb850cde0723f8844f5 (patch)
tree0346e64e6e4a03bc25c3b455408cb086f28c9b97 /src/socket/ingen_socket_client.cpp
parentdfad81a3c8aee40a515f0ecefb0180a86368b54a (diff)
downloadingen-400bbe503f44d306f5488eb850cde0723f8844f5.tar.gz
ingen-400bbe503f44d306f5488eb850cde0723f8844f5.tar.bz2
ingen-400bbe503f44d306f5488eb850cde0723f8844f5.zip
Move Socket class to Raul.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5079 a436a847-0d15-0410-975c-d299462d15a1
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));