RoboidControl-cpp/Windows/WindowsParticipant.h

28 lines
624 B
C++

#pragma once
#include "Participants/ParticipantUDP.h"
namespace RoboidControl {
namespace Windows {
class ParticipantUDP : public RoboidControl::ParticipantUDP {
public:
ParticipantUDP();
void Setup(int localPort, const char* remoteIpAddress, int remotePort);
void SetupTCP(const char* remoteIpAddres, int remotePort);
bool Send(Participant* remoteParticipant, int bufferSize);
bool SendTCP(int bufferSize);
bool Publish(IMessage* msg);
void Receive();
int ReceiveTCP();
protected:
#if defined(_WIN32) || defined(_WIN64)
SOCKET sock;
#endif
};
} // namespace Windows
} // namespace RoboidControl