WIP connect from menu

This commit is contained in:
stiffly
2016-03-09 14:33:20 +01:00
parent 67ccb5bee5
commit 09171a1a18
8 changed files with 31 additions and 8 deletions
+3 -2
View File
@@ -10,14 +10,15 @@ UDPClient::~UDPClient()
{
}
void UDPClient::Connect(std::string playerName, std::string address, int port)
bool UDPClient::Connect(std::string playerName, std::string address, int port)
{
if (m_Socket) {
return;
return false;
}
m_ReceiverEndpoint = udp::endpoint(boost::asio::ip::address().from_string(address), port);
m_Socket = boost::shared_ptr<boost::asio::ip::udp::socket>(new boost::asio::ip::udp::socket(m_IOService));
m_Socket->open(boost::asio::ip::udp::v4());
return true;
}
void UDPClient::Disconnect()