summaryrefslogtreecommitdiffstats
path: root/src/Server/ConnectionManager.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-05-30 13:37:06 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-05-30 13:37:06 +0200
commita77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898 (patch)
tree36a4c899af336c7e9dc326da7231d4d9e17e8a1b /src/Server/ConnectionManager.cpp
parentcb8e66c1b1f1c8076053d71347d0b1f96ca0bca1 (diff)
downloadmad-a77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898.tar
mad-a77d2d1e08e4e2e8dfb5e4fc326f6c8fe315a898.zip
Thread-sichere Signale implementiert
Diffstat (limited to 'src/Server/ConnectionManager.cpp')
-rw-r--r--src/Server/ConnectionManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Server/ConnectionManager.cpp b/src/Server/ConnectionManager.cpp
index 2ce2bb5..37e04d2 100644
--- a/src/Server/ConnectionManager.cpp
+++ b/src/Server/ConnectionManager.cpp
@@ -53,7 +53,7 @@ bool ConnectionManager::ServerConnection::send(const Net::Packet &packet) {
ConnectionManager::ServerConnection::ServerConnection(boost::shared_ptr<Net::Connection> connection0)
: connection(connection0), type(UNKNOWN), hostInfo(0) {
- connection->signalReceive().connect(boost::bind(&ServerConnection::receive, this, _1));
+ connection->connectSignalReceive(boost::bind(&ServerConnection::receive, this, _1));
}
bool ConnectionManager::ServerConnection::isConnected() const {
@@ -146,7 +146,7 @@ void ConnectionManager::configFinished() {
if(listenerAddresses.empty()) {
try {
boost::shared_ptr<Net::Listener> listener(new Net::Listener(x509CertFile, x509KeyFile));
- listener->signalNewConnection().connect(boost::bind(&ConnectionManager::handleNewConnection, this, _1));
+ listener->connectSignalNewConnection(boost::bind(&ConnectionManager::handleNewConnection, this, _1));
listeners.push_back(listener);
}
catch(Net::Exception &e) {
@@ -157,7 +157,7 @@ void ConnectionManager::configFinished() {
for(std::vector<boost::asio::ip::tcp::endpoint>::const_iterator address = listenerAddresses.begin(); address != listenerAddresses.end(); ++address) {
try {
boost::shared_ptr<Net::Listener> listener(new Net::Listener(x509CertFile, x509KeyFile, *address));
- listener->signalNewConnection().connect(boost::bind(&ConnectionManager::handleNewConnection, this, _1));
+ listener->connectSignalNewConnection(boost::bind(&ConnectionManager::handleNewConnection, this, _1));
listeners.push_back(listener);
}
catch(Net::Exception &e) {
@@ -169,7 +169,7 @@ void ConnectionManager::configFinished() {
void ConnectionManager::handleNewConnection(boost::shared_ptr<Net::Connection> con) {
boost::shared_ptr<ServerConnection> connection(new ServerConnection(con));
- con->signalDisconnected().connect(boost::bind(&ConnectionManager::handleDisconnect, this, connection));
+ con->connectSignalDisconnected(boost::bind(&ConnectionManager::handleDisconnect, this, connection));
connections.insert(connection);
Common::RequestManager::get()->registerConnection(connection.get());