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

tcpStream.h (536B)


      1 #pragma once
      2 
      3 #include <cstdint>
      4 
      5 #include "stream.h"
      6 
      7 namespace ptypes
      8 {
      9 	class ipstream;
     10 }
     11 
     12 namespace networkLib
     13 {
     14 	class TcpStream : public Stream
     15 	{
     16 	public:
     17 		explicit TcpStream(ptypes::ipstream* _stream);
     18 		virtual ~TcpStream();
     19 
     20 		void close() override;
     21 		bool isValid() const override;
     22 		bool flush() override;
     23 
     24 		auto* getPtypesStream() const { return m_stream; }
     25 
     26 	private:
     27 		bool read(void* _buf, uint32_t _byteSize) override;
     28 		bool write(const void* _buf, uint32_t _byteSize) override;
     29 
     30 		ptypes::ipstream* m_stream;
     31 	};
     32 }