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

udpServer.h (433B)


      1 #pragma once
      2 
      3 #include <vector>
      4 
      5 #include "networkThread.h"
      6 
      7 namespace networkLib
      8 {
      9 	class UdpServer : NetworkThread
     10 	{
     11 	public:
     12 		UdpServer(const int _udpPort) : m_port(_udpPort)
     13 		{
     14 			start();
     15 		}
     16 	protected:
     17 		void threadFunc() override;
     18 
     19 		virtual uint32_t getMaxRequestSize() const { return 60000; }
     20 		virtual std::vector<uint8_t> validateRequest(const std::vector<uint8_t>& _request) = 0;
     21 
     22 	private:
     23 		const int m_port;
     24 	};
     25 }