#pragma once #include #include #include #include #include #pragma comment(lib, "ws2_32.lib") struct PacketHeader { uint64_t timestamp; uint32_t width; uint32_t height; uint32_t frameType; // 0=I, 1=P uint32_t dataSize; }; class NetworkSender { public: NetworkSender(); ~NetworkSender(); bool Initialize(const std::vector& ips, int port); bool SendFrame(const std::vector& data, uint64_t timestamp, int width, int height, bool isKeyFrame); private: SOCKET socket_ = INVALID_SOCKET; std::vector destAddrs_; };