Comment some code
This commit is contained in:
@@ -63,17 +63,26 @@ namespace ColumnLynx::Net::TCP {
|
||||
}
|
||||
}
|
||||
|
||||
// Starts the TCP Client and initiaties the handshake
|
||||
void start();
|
||||
// Sends a TCP message to the server
|
||||
void sendMessage(ClientMessageType type, const std::string& data = "");
|
||||
// Attempt to gracefully disconnect from the server
|
||||
void disconnect(bool echo = true);
|
||||
|
||||
// Get the handshake status
|
||||
bool isHandshakeComplete() const;
|
||||
// Get the connection status
|
||||
bool isConnected() const;
|
||||
|
||||
private:
|
||||
// Start the heartbeat routine
|
||||
void mStartHeartbeat();
|
||||
// Handle an incoming TCP message
|
||||
void mHandleMessage(ServerMessageType type, const std::string& data);
|
||||
|
||||
// TODO: Move ptrs to smart ptrs
|
||||
|
||||
bool mConnected = false;
|
||||
bool mHandshakeComplete = false;
|
||||
tcp::resolver mResolver;
|
||||
|
||||
@@ -25,12 +25,17 @@ namespace ColumnLynx::Net::UDP {
|
||||
mStartReceive();
|
||||
}
|
||||
|
||||
// Start the UDP client
|
||||
void start();
|
||||
// Send a UDP message
|
||||
void sendMessage(const std::string& data = "");
|
||||
// Stop the UDP client
|
||||
void stop();
|
||||
|
||||
private:
|
||||
// Start the UDP listener routine
|
||||
void mStartReceive();
|
||||
// Handle an incoming UDP message
|
||||
void mHandlePacket(std::size_t bytes);
|
||||
|
||||
asio::ip::udp::socket mSocket;
|
||||
|
||||
Reference in New Issue
Block a user