client/Write: add noexcept
This commit is contained in:
parent
6db84852ae
commit
3610f55479
@ -124,12 +124,12 @@ public:
|
||||
void Close() noexcept;
|
||||
void SetExpired() noexcept;
|
||||
|
||||
bool Write(const void *data, size_t length);
|
||||
bool Write(const void *data, size_t length) noexcept;
|
||||
|
||||
/**
|
||||
* Write a null-terminated string.
|
||||
*/
|
||||
bool Write(const char *data);
|
||||
bool Write(const char *data) noexcept;
|
||||
|
||||
/**
|
||||
* returns the uid of the client process, or a negative value
|
||||
|
@ -22,14 +22,14 @@
|
||||
#include <string.h>
|
||||
|
||||
bool
|
||||
Client::Write(const void *data, size_t length)
|
||||
Client::Write(const void *data, size_t length) noexcept
|
||||
{
|
||||
/* if the client is going to be closed, do nothing */
|
||||
return !IsExpired() && FullyBufferedSocket::Write(data, length);
|
||||
}
|
||||
|
||||
bool
|
||||
Client::Write(const char *data)
|
||||
Client::Write(const char *data) noexcept
|
||||
{
|
||||
return Write(data, strlen(data));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user