summaryrefslogtreecommitdiffstats
path: root/src/socket/ingen_socket_server.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_server.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_server.cpp')
-rw-r--r--src/socket/ingen_socket_server.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/socket/ingen_socket_server.cpp b/src/socket/ingen_socket_server.cpp
index e4f14249..440f1597 100644
--- a/src/socket/ingen_socket_server.cpp
+++ b/src/socket/ingen_socket_server.cpp
@@ -23,11 +23,11 @@
#include "ingen/Configuration.hpp"
#include "ingen/Module.hpp"
#include "ingen/World.hpp"
+#include "raul/Socket.hpp"
#include "../server/Engine.hpp"
#include "../server/EventWriter.hpp"
-#include "Socket.hpp"
#include "SocketServer.hpp"
#define UNIX_SCHEME "unix://"
@@ -36,7 +36,9 @@ namespace Ingen {
namespace Socket {
static void
-ingen_listen(Ingen::World* world, Socket* unix_sock, Socket* net_sock)
+ingen_listen(Ingen::World* world,
+ Raul::Socket* unix_sock,
+ Raul::Socket* net_sock)
{
const std::string unix_path(world->conf().option("socket").ptr<char>());
@@ -91,14 +93,14 @@ ingen_listen(Ingen::World* world, Socket* unix_sock, Socket* net_sock)
}
if (pfds[0].revents & POLLIN) {
- SPtr<Socket> conn = unix_sock->accept();
+ SPtr<Raul::Socket> conn = unix_sock->accept();
if (conn) {
new SocketServer(*world, *engine, conn);
}
}
if (pfds[1].revents & POLLIN) {
- SPtr<Socket> conn = net_sock->accept();
+ SPtr<Raul::Socket> conn = net_sock->accept();
if (conn) {
new SocketServer(*world, *engine, conn);
}
@@ -109,8 +111,8 @@ ingen_listen(Ingen::World* world, Socket* unix_sock, Socket* net_sock)
struct ServerModule : public Ingen::Module
{
ServerModule()
- : unix_sock(Socket::Type::UNIX)
- , net_sock(Socket::Type::TCP)
+ : unix_sock(Raul::Socket::Type::UNIX)
+ , net_sock(Raul::Socket::Type::TCP)
{}
~ServerModule() {
@@ -127,8 +129,8 @@ struct ServerModule : public Ingen::Module
}
World* world;
- Socket unix_sock;
- Socket net_sock;
+ Raul::Socket unix_sock;
+ Raul::Socket net_sock;
std::unique_ptr<std::thread> thread;
};