event/SocketEvent: move ssize_t to class BufferedSocket
This commit is contained in:
parent
e7b15a9041
commit
5e68531428
@ -26,6 +26,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
class EventLoop;
|
class EventLoop;
|
||||||
|
|
||||||
@ -39,7 +40,7 @@ protected:
|
|||||||
SocketEvent event;
|
SocketEvent event;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using ssize_t = SocketEvent::ssize_t;
|
using ssize_t = std::make_signed<size_t>::type;
|
||||||
|
|
||||||
BufferedSocket(SocketDescriptor _fd, EventLoop &_loop) noexcept
|
BufferedSocket(SocketDescriptor _fd, EventLoop &_loop) noexcept
|
||||||
:event(_loop, BIND_THIS_METHOD(OnSocketReady), _fd) {
|
:event(_loop, BIND_THIS_METHOD(OnSocketReady), _fd) {
|
||||||
|
@ -25,9 +25,6 @@
|
|||||||
#include "util/BindMethod.hxx"
|
#include "util/BindMethod.hxx"
|
||||||
#include "util/IntrusiveList.hxx"
|
#include "util/IntrusiveList.hxx"
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
class EventLoop;
|
class EventLoop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,8 +72,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
static constexpr unsigned IMPLICIT_FLAGS = ERROR|HANGUP;
|
static constexpr unsigned IMPLICIT_FLAGS = ERROR|HANGUP;
|
||||||
|
|
||||||
using ssize_t = std::make_signed<size_t>::type;
|
|
||||||
|
|
||||||
SocketEvent(EventLoop &_loop, Callback _callback,
|
SocketEvent(EventLoop &_loop, Callback _callback,
|
||||||
SocketDescriptor _fd=SocketDescriptor::Undefined()) noexcept
|
SocketDescriptor _fd=SocketDescriptor::Undefined()) noexcept
|
||||||
:loop(_loop),
|
:loop(_loop),
|
||||||
|
Loading…
Reference in New Issue
Block a user