const buffer
This commit is contained in:
parent
7cac9a29b3
commit
b2706e48a8
|
@ -54,7 +54,12 @@ add_executable(connecting_a_socket
|
|||
src/sdk.h)
|
||||
target_link_libraries(connecting_a_socket PRIVATE Threads::Threads)
|
||||
|
||||
add_executable(accepting_connections.cpp
|
||||
add_executable(accepting_connections
|
||||
src/chapter01_the_basics/accepting_connections.cpp
|
||||
src/sdk.h)
|
||||
target_link_libraries(accepting_connections.cpp PRIVATE Threads::Threads)
|
||||
target_link_libraries(accepting_connections PRIVATE Threads::Threads)
|
||||
|
||||
add_executable(output_buffer
|
||||
src/chapter02_io/output_buffer.cpp
|
||||
src/sdk.h)
|
||||
target_link_libraries(output_buffer PRIVATE Threads::Threads)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#include <boost/asio.hpp>
|
||||
#include <iostream>
|
||||
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
string buf = "Hello, World!"s;
|
||||
asio::const_buffers_1 output_buf = asio::buffer(const_cast<const string&>(buf));
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue