#ifndef WINGS_SOCKET_H #define WINGS_SOCKET_H #include #include namespace wings { struct WingsSocketInfo { const char *address; uint64_t port; bool shared; uint64_t backlog; bool v6Only; Dart_Handle sendPortHandle; bool operator==(const WingsSocketInfo& other) const; }; class WingsSocket { public: explicit WingsSocket(int sockfd, const WingsSocketInfo& info); void incrRef(Dart_Port port); const WingsSocketInfo& getInfo() const; private: WingsSocketInfo info; int sockfd; int refCount; std::vector sendPorts; }; extern std::vector globalSocketList; } // namespace wings #endif