projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix local server for multiple applications
[anna.git]
/
source
/
comm
/
Socket.cpp
diff --git
a/source/comm/Socket.cpp
b/source/comm/Socket.cpp
index
9a7db2b
..
365f427
100644
(file)
--- a/
source/comm/Socket.cpp
+++ b/
source/comm/Socket.cpp
@@
-97,7
+97,7
@@
Socket::~Socket() {
}
bool Socket::support(const char* transportClassName) const
}
bool Socket::support(const char* transportClassName) const
-
throw()
{
+{
if(a_transportFactory == NULL)
return false;
if(a_transportFactory == NULL)
return false;
@@
-109,7
+109,7
@@
throw() {
// ya tienen activa su propia zona de exclusin.
//---------------------------------------------------------------------------
void Socket::open()
// ya tienen activa su propia zona de exclusin.
//---------------------------------------------------------------------------
void Socket::open()
-
throw(RuntimeException
) {
+
noexcept(false
) {
if(a_fd != -1)
return;
if(a_fd != -1)
return;
@@
-144,7
+144,7
@@
throw(RuntimeException) {
}
void Socket::close()
}
void Socket::close()
-
throw()
{
+{
if(a_fd == -1)
return;
if(a_fd == -1)
return;
@@
-164,7
+164,7
@@
throw() {
}
bool Socket::setBlockingMode(const bool blockingMode)
}
bool Socket::setBlockingMode(const bool blockingMode)
-
throw(RuntimeException
) {
+
noexcept(false
) {
int opts;
int result;
anna_socket_assert(a_fd == -1, "Socket is not opened");
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)
}
bool Socket::setReuseMode(const bool reuseMode)
-
throw(RuntimeException
) {
+
noexcept(false
) {
anna_socket_assert(a_fd == -1, "Socket is not opened");
if(a_reuseMode == reuseMode)
anna_socket_assert(a_fd == -1, "Socket is not opened");
if(a_reuseMode == reuseMode)
@@
-204,7
+204,7
@@
throw(RuntimeException) {
}
void Socket::bind()
}
void Socket::bind()
-
throw(RuntimeException
) {
+
noexcept(false
) {
Guard guard(*this, "comm::Socket::bind");
if(a_fd == -1)
Guard guard(*this, "comm::Socket::bind");
if(a_fd == -1)
@@
-231,17
+231,14
@@
throw(RuntimeException) {
}
int Socket::do_bind(const struct sockaddr *addr, const int len)
}
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
return ::bind(a_fd, addr, len);
}
std::string Socket::asString() const
-
throw()
{
+{
std::string msg("comm::Socket { Domain: ");
std::string msg("comm::Socket { Domain: ");
- if(this == NULL)
- return msg += " <null> }";
-
switch(a_domain) {
case Domain::Unix: msg += "Unix"; break;
case Domain::Inet: msg += "Inet"; break;
switch(a_domain) {
case Domain::Unix: msg += "Unix"; break;
case Domain::Inet: msg += "Inet"; break;
@@
-278,7
+275,7
@@
throw() {
}
xml::Node* Socket::asXML(xml::Node* parent) const
}
xml::Node* Socket::asXML(xml::Node* parent) const
-
throw(RuntimeException
) {
+
noexcept(false
) {
const char* aux;
xml::Node* result = parent->createChild("comm.Socket");
const char* aux;
xml::Node* result = parent->createChild("comm.Socket");
@@
-316,7
+313,7
@@
throw(RuntimeException) {
}
const char* Socket::asText(const Socket::Notify::_v v)
}
const char* Socket::asText(const Socket::Notify::_v v)
-
throw()
{
+{
static const char* text [] = { "None", "ReceiveData", "Close", "Corrupt" };
return text [v];
}
static const char* text [] = { "None", "ReceiveData", "Close", "Corrupt" };
return text [v];
}