Skip to content

Commit 94f96a4

Browse files
committed
细节改进
1 parent d0d8c1e commit 94f96a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/network/network.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ namespace cs_impl {
8787
std::string receive(std::size_t maximum)
8888
{
8989
buffer<> buff(maximum);
90-
std::size_t actually = sock.receive(asio::buffer(buff.get(), maximum));
90+
std::size_t actually = sock.read_some(asio::buffer(buff.get(), maximum));
9191
return std::string(buff.get(), actually);
9292
}
9393

9494
void send(const std::string &s)
9595
{
96-
sock.send(asio::buffer(s));
96+
sock.write_some(asio::buffer(s));
9797
}
9898

9999
tcp::endpoint remote_endpoint()

0 commit comments

Comments
 (0)