mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 22:05:38 +00:00
29 lines
424 B
C++
29 lines
424 B
C++
#ifndef _UDP_RECEIVE_H_
|
|
#define _UDP_RECEIVE_H_
|
|
|
|
#include "UDPPacket.h"
|
|
#include "WinSockWrap.h"
|
|
#include <vector>
|
|
|
|
namespace SMUDP
|
|
{
|
|
class UDPReceive
|
|
{
|
|
public:
|
|
UDPReceive();
|
|
~UDPReceive();
|
|
|
|
bool Bind(UINT16 port);
|
|
|
|
std::vector<UINT8>& ReadData(int timeout);
|
|
|
|
private:
|
|
|
|
std::vector<UINT8> m_data;
|
|
SOCKET m_socket;
|
|
HANDLE m_readEvent;
|
|
WinSockWrap m_winSockWrap;
|
|
};
|
|
}
|
|
|
|
#endif |