28 lines
726 B
C++
28 lines
726 B
C++
#pragma once
|
|
#if defined(_WIN32) || defined(_WIN64)
|
|
|
|
#include "Participants/ParticipantUDP.h"
|
|
|
|
namespace RoboidControl {
|
|
|
|
class ParticipantUDP : public ParticipantUDPGeneric {
|
|
public:
|
|
ParticipantUDP(int port = 7681);
|
|
ParticipantUDP(const char* ipAddress, int port = 7681, int localPort = 7681);
|
|
void SetupUDP(int localPort, const char* remoteIpAddress, int remotePort);
|
|
void SetupTCP(const char* remoteIpAddres, int remotePort);
|
|
bool SendTo(ParticipantSocket* remoteParticipant, int bufferSize);
|
|
bool SendTCP(int bufferSize);
|
|
bool Publish(IMessage* msg);
|
|
|
|
void ReceiveUDP();
|
|
int ReceiveTCP();
|
|
|
|
protected:
|
|
#if defined(_WIN32) || defined(_WIN64)
|
|
SOCKET sock;
|
|
#endif
|
|
};
|
|
|
|
} // namespace RoboidControl
|
|
#endif |