mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-21 04:33:56 +00:00
25 lines
457 B
C++
25 lines
457 B
C++
#pragma once
|
|
|
|
#include "i_socket.hpp"
|
|
|
|
#include <memory>
|
|
|
|
namespace network
|
|
{
|
|
struct poll_entry
|
|
{
|
|
i_socket* s{};
|
|
int16_t events{};
|
|
int16_t revents{};
|
|
};
|
|
|
|
struct socket_factory
|
|
{
|
|
socket_factory();
|
|
virtual ~socket_factory() = default;
|
|
|
|
virtual std::unique_ptr<i_socket> create_socket(int af, int type, int protocol);
|
|
virtual int poll_sockets(std::span<poll_entry> entries);
|
|
};
|
|
}
|