X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=source%2Fcomm%2FSocket.cpp;fp=source%2Fcomm%2FSocket.cpp;h=365f4278ba750a08e71398fe3b0916dd4642258c;hp=9f770f3dbdaf4f6573ffffbdba192d95d568595f;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/source/comm/Socket.cpp b/source/comm/Socket.cpp index 9f770f3..365f427 100644 --- a/source/comm/Socket.cpp +++ b/source/comm/Socket.cpp @@ -97,7 +97,7 @@ Socket::~Socket() { } bool Socket::support(const char* transportClassName) const -throw() { +{ if(a_transportFactory == NULL) return false; @@ -109,7 +109,7 @@ throw() { // ya tienen activa su propia zona de exclusin. //--------------------------------------------------------------------------- void Socket::open() -throw(RuntimeException) { +noexcept(false) { if(a_fd != -1) return; @@ -144,7 +144,7 @@ throw(RuntimeException) { } void Socket::close() -throw() { +{ if(a_fd == -1) return; @@ -164,7 +164,7 @@ throw() { } bool Socket::setBlockingMode(const bool blockingMode) -throw(RuntimeException) { +noexcept(false) { int opts; int result; anna_socket_assert(a_fd == -1, "Socket is not opened"); @@ -187,7 +187,7 @@ throw(RuntimeException) { } bool Socket::setReuseMode(const bool reuseMode) -throw(RuntimeException) { +noexcept(false) { anna_socket_assert(a_fd == -1, "Socket is not opened"); if(a_reuseMode == reuseMode) @@ -204,7 +204,7 @@ throw(RuntimeException) { } void Socket::bind() -throw(RuntimeException) { +noexcept(false) { Guard guard(*this, "comm::Socket::bind"); if(a_fd == -1) @@ -231,12 +231,12 @@ throw(RuntimeException) { } int Socket::do_bind(const struct sockaddr *addr, const int len) -throw(RuntimeException) { +noexcept(false) { return ::bind(a_fd, addr, len); } std::string Socket::asString() const -throw() { +{ std::string msg("comm::Socket { Domain: "); switch(a_domain) { @@ -275,7 +275,7 @@ throw() { } xml::Node* Socket::asXML(xml::Node* parent) const -throw(RuntimeException) { +noexcept(false) { const char* aux; xml::Node* result = parent->createChild("comm.Socket"); @@ -313,7 +313,7 @@ throw(RuntimeException) { } const char* Socket::asText(const Socket::Notify::_v v) -throw() { +{ static const char* text [] = { "None", "ReceiveData", "Close", "Corrupt" }; return text [v]; }