Added testclient
This commit is contained in:
37
testClient/src/Client.h
Normal file
37
testClient/src/Client.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL_net.h>
|
||||
#include <string>
|
||||
|
||||
class Client;
|
||||
|
||||
#include "ClientStates.h"
|
||||
|
||||
|
||||
class Client {
|
||||
public:
|
||||
Client(std::string serverIP, int port);
|
||||
~Client();
|
||||
|
||||
Client(const Client&) = delete;
|
||||
|
||||
void setClientState(ClientState *state);
|
||||
|
||||
void update(unsigned int delta);
|
||||
|
||||
|
||||
bool sendConnectionRequest(IPaddress dest);
|
||||
bool sendPacket(UDPpacket &packet);
|
||||
|
||||
UDPsocket udpSocket;
|
||||
IPaddress serverIP;
|
||||
|
||||
UDPpacket *connectionRequest;
|
||||
UDPpacket *receivedPacket;
|
||||
|
||||
ClientState *currentState;
|
||||
|
||||
Connected *connected;
|
||||
Connecting *connecting;
|
||||
Disconnected *disconnected;
|
||||
};
|
||||
Reference in New Issue
Block a user