Mesen/Core/ClientConnectionData.h
Souryo e7e77ccfa7 Converted all wide strings to utf8 strings
Fixed exception throwing to be standard
2015-07-11 08:27:22 -04:00

32 lines
592 B
C++

#pragma once
#include "stdafx.h"
class ClientConnectionData
{
public:
string Host;
uint16_t Port;
string PlayerName;
uint8_t* AvatarData;
uint32_t AvatarSize;
ClientConnectionData(string host, uint16_t port, string playerName, uint8_t* avatarData, uint32_t avatarSize) :
Host(host), Port(port), PlayerName(playerName), AvatarSize(avatarSize)
{
if(avatarSize > 0) {
AvatarData = new uint8_t[avatarSize];
memcpy(AvatarData, avatarData, avatarSize);
} else {
AvatarData = nullptr;
}
}
~ClientConnectionData()
{
if(AvatarData) {
delete[] AvatarData;
}
}
};