Skip to content

Commit 9b314a5

Browse files
committed
Now client only send message
1 parent 2e261b9 commit 9b314a5

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

client.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,4 @@ void client::Send(const std::vector<std::string>& message)
2222
boost::asio::write(socket_, boost::asio::buffer(request, request_length));
2323

2424
std::cout << "\tCLIENT MSG SEND TO " << ep.address() << ":" << ep.port() << "\tDATA: " << request << std::endl;
25-
}
26-
27-
void client::GetReply()
28-
{
29-
char reply[max_length];
30-
31-
size_t reply_length = boost::asio::read(
32-
socket_,
33-
boost::asio::buffer(reply, request_length)
34-
);
35-
36-
memset(request, 0, sizeof request);
37-
std::cout << "\tSERVER REPLY FROM " << ep.address() << ":" << ep.port() << "\tDATA: ";
38-
std::cout.write(reply, reply_length);
39-
std::cout << std::endl << std::endl;
4025
}

client.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class client
1616

1717
void ConnectToServer(const std::string& host, const std::string& port);
1818
void Send(const std::vector<std::string>& message);
19-
void GetReply();
2019

2120
~client() noexcept
2221
{

main_client.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ int main(void)
7575
{
7676
if (connected) {
7777
client.Send(msg);
78-
client.GetReply();
7978
}
8079
else {
8180
out << "\tYou need to connect to the server! Use: \"connect <string>\"" << "\n";

0 commit comments

Comments
 (0)