Files
jak-project/common/cross_sockets/XSocketClient.h
T
Tyler Wilding 9fdf0bbc2f tools: Add cutscene player / subtitle editor window (#1429)
* stash

* temp

* tools: subtitle tool works! just gotta fill out the db / polish UX

* tools: added configuration for every subtitle we have so far

* tools: add some colors to the editor, time for repl controls and make it run the code!

* tools: continuing polish of tool, getting very close

* tools: finished UX polish, just need to write deserializers

* tools: added deserializer for subtitle data

* tools: exported subtitle files, all data appears intact

* tools: more UX polish and test all the cutscenes, majority work

* assets: update subtitle files

* lint: formatting and cleanup

* lint: codacy lints
2022-06-11 16:32:27 +01:00

29 lines
589 B
C++

#pragma once
#include "common/cross_sockets/XSocket.h"
#include <thread>
#include "common/common_types.h"
#include <functional>
#include <mutex>
/// @brief A cross platform generic socket client implementation
class XSocketClient {
public:
XSocketClient(int _tcp_port);
~XSocketClient();
XSocketClient(const XSocketClient&) = delete;
XSocketClient& operator=(const XSocketClient&) = delete;
bool connect();
void disconnect();
bool is_connected() { return client_socket != -1; }
protected:
int tcp_port;
struct sockaddr_in addr = {};
int client_socket = -1;
};