diff options
Diffstat (limited to 'src/lib/net/XSocket.cpp')
| -rw-r--r-- | src/lib/net/XSocket.cpp | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/lib/net/XSocket.cpp b/src/lib/net/XSocket.cpp index 13e0fc3..eed7a26 100644 --- a/src/lib/net/XSocket.cpp +++ b/src/lib/net/XSocket.cpp @@ -23,8 +23,7 @@ // XSocketAddress // -XSocketAddress::XSocketAddress(EError error, - const String& hostname, int port) _NOEXCEPT : +XSocketAddress::XSocketAddress(EError error, const std::string& hostname, int port) noexcept : m_error(error), m_hostname(hostname), m_port(port) @@ -32,26 +31,22 @@ XSocketAddress::XSocketAddress(EError error, // do nothing } -XSocketAddress::EError -XSocketAddress::getError() const throw() +XSocketAddress::EError XSocketAddress::getError() const noexcept { return m_error; } -String -XSocketAddress::getHostname() const throw() +std::string XSocketAddress::getHostname() const noexcept { return m_hostname; } -int -XSocketAddress::getPort() const throw() +int XSocketAddress::getPort() const noexcept { return m_port; } -String -XSocketAddress::getWhat() const throw() +std::string XSocketAddress::getWhat() const noexcept { static const char* s_errorID[] = { "XSocketAddressUnknown", @@ -77,8 +72,7 @@ XSocketAddress::getWhat() const throw() // XSocketIOClose // -String -XSocketIOClose::getWhat() const throw() +std::string XSocketIOClose::getWhat() const noexcept { return format("XSocketIOClose", "close: %{1}", what()); } @@ -88,8 +82,7 @@ XSocketIOClose::getWhat() const throw() // XSocketBind // -String -XSocketBind::getWhat() const throw() +std::string XSocketBind::getWhat() const noexcept { return format("XSocketBind", "cannot bind address: %{1}", what()); } @@ -99,8 +92,7 @@ XSocketBind::getWhat() const throw() // XSocketConnect // -String -XSocketConnect::getWhat() const throw() +std::string XSocketConnect::getWhat() const noexcept { return format("XSocketConnect", "cannot connect socket: %{1}", what()); } @@ -110,8 +102,7 @@ XSocketConnect::getWhat() const throw() // XSocketCreate // -String -XSocketCreate::getWhat() const throw() +std::string XSocketCreate::getWhat() const noexcept { return format("XSocketCreate", "cannot create socket: %{1}", what()); } |
