Files
visualboyadvance-m/src/core/gba/internal/gbaSockClient.h
Fabrice de Gans 047bd935ea [Build] Move the core emulator to src/core/
* Move src/apu/, src/gb/ and src/gba/ to src/core/.
* Clean up include guards and headers.
* Rename `BKPT_SUPPORT` to `VBAM_ENABLE_DEBUGGER` and remove the
  `NO_DEBUGGER` define.
2024-03-16 14:35:36 -07:00

36 lines
811 B
C++

#ifndef VBAM_CORE_GBA_INTERNAL_GBASOCKCLIENT_H_
#define VBAM_CORE_GBA_INTERNAL_GBASOCKCLIENT_H_
#if defined(NO_LINK)
#error "This file should not be included with NO_LINK."
#endif // defined(NO_LINK)
#include <cstdint>
#include <SFML/Network.hpp>
class GBASockClient {
public:
GBASockClient(sf::IpAddress _server_addr);
~GBASockClient();
bool Connect(sf::IpAddress server_addr);
void Send(std::vector<char> data);
char ReceiveCmd(char* data_in, bool block);
void ReceiveClock(bool block);
void ClockSync(uint32_t ticks);
void Disconnect();
bool IsDisconnected();
private:
sf::IpAddress server_addr;
sf::TcpSocket client;
sf::TcpSocket clock_client;
int32_t clock_sync;
bool is_disconnected;
};
#endif // VBAM_CORE_GBA_INTERNAL_GBASOCKCLIENT_H_