diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-08-27 03:54:43 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-08-27 03:54:43 +0200 |
commit | c9a0accf145e403496ad84729a10735ef79f55de (patch) | |
tree | 5bbfe8f419e8d41a9995c2adb51d8945ddbe272f /src/madc.cpp | |
parent | 59bec05e406a0cf55c52d13cecfe76dccf83cd19 (diff) | |
download | mad-c9a0accf145e403496ad84729a10735ef79f55de.tar mad-c9a0accf145e403496ad84729a10735ef79f55de.zip |
mad, madc: Verbindungen schon vor dem Verbinden registrieren
Diffstat (limited to 'src/madc.cpp')
-rw-r--r-- | src/madc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/madc.cpp b/src/madc.cpp index 23a9e45..5f6039d 100644 --- a/src/madc.cpp +++ b/src/madc.cpp @@ -63,14 +63,14 @@ int main(int argc, char *argv[]) { Common::ClientConnection *connection = new Common::ClientConnection(&application); try { + application.getRequestManager()->registerConnection(connection); + connection->connect(boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string(argv[1]), 6666)); std::cerr << "Connecting to " << argv[1] << "..." << std::flush; connection->waitWhileConnecting(); - application.getRequestManager()->registerConnection(connection); - std::cerr << " connected." << std::endl << std::endl; { |