diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-05-06 17:39:30 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-05-06 17:39:30 +0200 |
commit | 8324b947487f72fd8cfc439ea5ae5bd1187fff1b (patch) | |
tree | e7fb69f3207654b5e3d4ba260d3f51082b1d399a /src/Net/Listener.cpp | |
parent | 5bf3e2229015d93808bb0c2f4729c2c4f4da414e (diff) | |
download | mad-8324b947487f72fd8cfc439ea5ae5bd1187fff1b.tar mad-8324b947487f72fd8cfc439ea5ae5bd1187fff1b.zip |
Exception und ThreadHandler nach Net verschoben
Diffstat (limited to 'src/Net/Listener.cpp')
-rw-r--r-- | src/Net/Listener.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Net/Listener.cpp b/src/Net/Listener.cpp index c4c5194..95147fa 100644 --- a/src/Net/Listener.cpp +++ b/src/Net/Listener.cpp @@ -41,7 +41,7 @@ void Listener::acceptHandler(int) { } } -Listener::Listener(const std::string &x905CertFile0, const std::string &x905KeyFile0, const IPAddress &address0) throw(Common::Exception) +Listener::Listener(const std::string &x905CertFile0, const std::string &x905KeyFile0, const IPAddress &address0) throw(Exception) : x905CertFile(x905CertFile0), x905KeyFile(x905KeyFile0), address(address0) { gnutls_dh_params_init(&dh_params); gnutls_dh_params_generate2(dh_params, 768); @@ -49,7 +49,7 @@ Listener::Listener(const std::string &x905CertFile0, const std::string &x905KeyF sock = socket(PF_INET, SOCK_STREAM, 0); if(sock < 0) - throw Common::Exception("socket()", Common::Exception::INTERNAL_ERRNO, errno); + throw Exception("socket()", Exception::INTERNAL_ERRNO, errno); // Set non-blocking flag int flags = fcntl(sock, F_GETFL, 0); @@ -57,7 +57,7 @@ Listener::Listener(const std::string &x905CertFile0, const std::string &x905KeyF if(flags < 0) { close(sock); - throw Common::Exception("fcntl()", Common::Exception::INTERNAL_ERRNO, errno); + throw Exception("fcntl()", Exception::INTERNAL_ERRNO, errno); } fcntl(sock, F_SETFL, flags | O_NONBLOCK); @@ -69,13 +69,13 @@ Listener::Listener(const std::string &x905CertFile0, const std::string &x905KeyF if(bind(sock, address.getSockAddr(), address.getSockAddrLength()) < 0) { close(sock); - throw Common::Exception("bind()", Common::Exception::INTERNAL_ERRNO, errno); + throw Exception("bind()", Exception::INTERNAL_ERRNO, errno); } if(listen(sock, 64) < 0) { close(sock); - throw Common::Exception("listen()", Common::Exception::INTERNAL_ERRNO, errno); + throw Exception("listen()", Exception::INTERNAL_ERRNO, errno); } FdManager::get()->registerFd(sock, sigc::mem_fun(this, &Listener::acceptHandler), POLLIN); |