mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-27 07:11:01 +00:00
Handle listen/accept/send/receive in afd_endpoint
This commit is contained in:
@@ -47,6 +47,8 @@ namespace network
|
||||
bool is_valid() const;
|
||||
|
||||
bool bind(const address& target);
|
||||
bool listen(int backlog);
|
||||
SOCKET accept(address& address);
|
||||
|
||||
bool set_blocking(bool blocking);
|
||||
static bool set_blocking(SOCKET s, bool blocking);
|
||||
@@ -62,6 +64,7 @@ namespace network
|
||||
int get_address_family() const;
|
||||
|
||||
bool is_ready(bool in_poll) const;
|
||||
bool is_listening() const;
|
||||
|
||||
static bool sleep_sockets(const std::span<const socket*>& sockets, std::chrono::milliseconds timeout,
|
||||
bool in_poll);
|
||||
@@ -74,5 +77,6 @@ namespace network
|
||||
|
||||
private:
|
||||
SOCKET socket_ = INVALID_SOCKET;
|
||||
bool listening_{};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user