Added Connection Codes
Private methods dont have capital letters and are words are separated by underscores Added id's to TcpClient's class Removed ptr from TcpClient and Server Worked on TcpServer Theres now a default server port Added ReceiveMessage function to TcpClient to receive only 1 message Fixed VoidNetClientAPI Receive function
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
#include "Utility.hpp"
|
||||
#include "Tags.hpp"
|
||||
|
||||
#include <future>
|
||||
|
||||
#undef SendMessage
|
||||
|
||||
bool VoidNetClientAPI::Connect(const std::string &ip, uint16 port)
|
||||
@ -50,11 +52,10 @@ void VoidNetClientAPI::SendMessage(byte distribution_mode, uint16 destination_id
|
||||
|
||||
void VoidNetClientAPI::Receive()
|
||||
{
|
||||
receive_thread = std::thread(ProcessAllData);
|
||||
receive_thread.detach();
|
||||
std::async(std::launch::async, &process_all_data);
|
||||
}
|
||||
|
||||
void VoidNetClientAPI::ProcessAllData()
|
||||
void VoidNetClientAPI::process_all_data()
|
||||
{
|
||||
client->ReceiveMessages();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user