Ensure the stream_recv_timeout example builds on all platforms.
This commit is contained in:
parent
ac541624a8
commit
cc1c770831
@ -34,6 +34,7 @@ all: \
|
||||
examples\timeouts\accept_timeout.exe \
|
||||
examples\timeouts\connect_timeout.exe \
|
||||
examples\timeouts\dgram_recv_timeout.exe \
|
||||
examples\timeouts\stream_recv_timeout.exe \
|
||||
examples\tutorial\timer1\timer.exe \
|
||||
examples\tutorial\timer2\timer.exe \
|
||||
examples\tutorial\timer3\timer.exe \
|
||||
|
@ -36,6 +36,7 @@ EXAMPLE_EXES = \
|
||||
examples/timeouts/accept_timeout.exe \
|
||||
examples/timeouts/connect_timeout.exe \
|
||||
examples/timeouts/dgram_recv_timeout.exe \
|
||||
examples/timeouts/stream_recv_timeout.exe \
|
||||
examples/tutorial/timer1/timer.exe \
|
||||
examples/tutorial/timer2/timer.exe \
|
||||
examples/tutorial/timer3/timer.exe \
|
||||
|
@ -38,6 +38,7 @@ all: \
|
||||
examples\timeouts\accept_timeout.exe \
|
||||
examples\timeouts\connect_timeout.exe \
|
||||
examples\timeouts\dgram_recv_timeout.exe \
|
||||
examples\timeouts\stream_recv_timeout.exe \
|
||||
examples\tutorial\timer1\timer.exe \
|
||||
examples\tutorial\timer2\timer.exe \
|
||||
examples\tutorial\timer3\timer.exe \
|
||||
@ -78,6 +79,7 @@ examples\multicast\sender.exe: examples\multicast\sender.obj
|
||||
examples\timeouts\accept_timeout.exe: examples\timeouts\accept_timeout.obj
|
||||
examples\timeouts\connect_timeout.exe: examples\timeouts\connect_timeout.obj
|
||||
examples\timeouts\dgram_recv_timeout.exe: examples\timeouts\dgram_recv_timeout.obj
|
||||
examples\timeouts\stream_recv_timeout.exe: examples\timeouts\stream_recv_timeout.obj
|
||||
examples\tutorial\timer1\timer.exe: examples\tutorial\timer1\timer.obj
|
||||
examples\tutorial\timer2\timer.exe: examples\tutorial\timer2\timer.obj
|
||||
examples\tutorial\timer3\timer.exe: examples\tutorial\timer3\timer.obj
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
{
|
||||
std::cout << "Successful accept\n";
|
||||
|
||||
socket_.async_recv(buf, BUFSIZ,
|
||||
socket_.async_recv(buf_, sizeof(buf_),
|
||||
boost::bind(&stream_handler::handle_recv, this, asio::arg::error));
|
||||
timer_.expiry(asio::time::now() + 5);
|
||||
timer_.async_wait(boost::bind(&stream_socket::close, &socket_));
|
||||
@ -51,7 +51,7 @@ private:
|
||||
timer timer_;
|
||||
socket_acceptor acceptor_;
|
||||
stream_socket socket_;
|
||||
char buf[BUFSIZ];
|
||||
char buf_[1024];
|
||||
};
|
||||
|
||||
void connect_handler()
|
||||
|
Loading…
Reference in New Issue
Block a user