summaryrefslogtreecommitdiffstats
path: root/src/mad.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-15 17:30:40 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-15 17:30:40 +0200
commitc8d469cc3de8ef2fb95f7b47355ebf5318a4c22f (patch)
tree2cb0bd20306f89f3da11ff22b19865ed99225b2f /src/mad.cpp
parent8324b947487f72fd8cfc439ea5ae5bd1187fff1b (diff)
downloadmad-c8d469cc3de8ef2fb95f7b47355ebf5318a4c22f.tar
mad-c8d469cc3de8ef2fb95f7b47355ebf5318a4c22f.zip
Einfache (ziemlich kaputte) Multithreaded IO
Diffstat (limited to 'src/mad.cpp')
-rw-r--r--src/mad.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mad.cpp b/src/mad.cpp
index bc150e2..1a504f6 100644
--- a/src/mad.cpp
+++ b/src/mad.cpp
@@ -17,7 +17,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "Net/Connection.h"
#include "Net/FdManager.h"
#include "Net/IPAddress.h"
#include "Net/ThreadManager.h"
@@ -43,8 +42,6 @@ static void requestFinished(const Common::Request&) {
}
int main() {
- Net::Connection::init();
-
Net::ThreadManager::get()->init();
Common::ModuleManager::get()->loadModule("FileLogger");
@@ -63,7 +60,7 @@ int main() {
connection->connect(Net::IPAddress("127.0.0.1"), true);
while(connection->isConnecting())
- Net::FdManager::get()->run();
+ usleep(100000);
Common::RequestManager::get()->registerConnection(connection);
@@ -77,7 +74,7 @@ int main() {
Common::RequestManager::get()->sendRequest<Daemon::Requests::IdentifyRequest>(connection, sigc::ptr_fun(requestFinished), "test");
while(connection->isConnected())
- Net::FdManager::get()->run();
+ usleep(100000);
Common::LogManager::get()->unregisterLogger(networkLogger);
@@ -95,7 +92,5 @@ int main() {
Common::Initializable::deinit();
- Net::Connection::deinit();
-
return 0;
}