gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

udpClient.h (682B)


      1 #pragma once
      2 
      3 #include "bridgeLib/commandReader.h"
      4 
      5 #include "networkLib/udpClient.h"
      6 
      7 namespace bridgeClient
      8 {
      9 	class UdpClient : networkLib::UdpClient
     10 	{
     11 	public:
     12 		using ServerFoundCallback = std::function<void(const std::string&, const bridgeLib::ServerInfo&, const bridgeLib::Error&)>;
     13 
     14 		UdpClient(const bridgeLib::PluginDesc& _desc, ServerFoundCallback&& _callback);
     15 		~UdpClient() override;
     16 
     17 	private:
     18 		bool validateResponse(const std::string& _host, const std::vector<uint8_t>& _message) override;
     19 		const std::vector<uint8_t>& getRequestPacket() override
     20 		{
     21 			return m_requestPacket;
     22 		}
     23 
     24 		std::vector<uint8_t> m_requestPacket;
     25 		ServerFoundCallback m_callback;
     26 	};
     27 }