net/SocketError: remove obsolete Error functions

This commit is contained in:
Max Kellermann 2016-11-07 08:58:26 +01:00
parent 54d5184255
commit 8c4246f2ad
2 changed files with 0 additions and 41 deletions

View File

@ -19,13 +19,10 @@
#include "config.h"
#include "SocketError.hxx"
#include "util/Domain.hxx"
#include "util/Macros.hxx"
#include <string.h>
const Domain socket_domain("socket");
#ifdef WIN32
SocketErrorMessage::SocketErrorMessage(socket_error_t code)

View File

@ -22,7 +22,6 @@
#include "Compiler.h"
#include "system/Error.hxx"
#include "util/Error.hxx" // IWYU pragma: export
#ifdef WIN32
#include <winsock2.h>
@ -32,14 +31,6 @@ typedef DWORD socket_error_t;
typedef int socket_error_t;
#endif
class Domain;
/**
* A #Domain for #Error for socket I/O errors. The code is an errno
* value (or WSAGetLastError() on Windows).
*/
extern const Domain socket_domain;
gcc_pure
static inline socket_error_t
GetSocketError()
@ -108,35 +99,6 @@ public:
}
};
static inline void
SetSocketError(Error &error, socket_error_t code)
{
const SocketErrorMessage msg(code);
error.Set(socket_domain, code, msg);
}
static inline void
SetSocketError(Error &error)
{
SetSocketError(error, GetSocketError());
}
gcc_const
static inline Error
NewSocketError(socket_error_t code)
{
Error error;
SetSocketError(error, code);
return error;
}
gcc_pure
static inline Error
NewSocketError()
{
return NewSocketError(GetSocketError());
}
gcc_const
static inline std::system_error
MakeSocketError(socket_error_t code, const char *msg)