mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 22:05:38 +00:00
28 lines
452 B
C++
28 lines
452 B
C++
#ifndef _TCPRECEIVE_H_
|
|
#define _TCPRECEIVE_H_
|
|
|
|
#include <thread>
|
|
#include <atomic>
|
|
#include <vector>
|
|
#include "SDLIncludes.h"
|
|
|
|
class TCPReceive
|
|
{
|
|
public:
|
|
TCPReceive(int port);
|
|
~TCPReceive();
|
|
|
|
std::vector<char>& Receive();
|
|
|
|
private:
|
|
|
|
void ListenFunc();
|
|
|
|
TCPsocket m_listenSocket;
|
|
std::atomic<TCPsocket> m_receiveSocket;
|
|
std::thread m_listenThread;
|
|
std::atomic_bool m_running;
|
|
std::vector<char> m_recBuffer;
|
|
};
|
|
|
|
#endif |