6 #include <boost/asio.hpp>
7 // #include "src/socket.hpp"
9 // #include "src/session_container.hpp"
10 // #include "src/server/session.hpp"
11 #include <boost/shared_ptr.hpp>
12 #include <boost/uuid.hpp>
13 #include <boost/enable_shared_from_this.hpp>
16 using namespace boost
;
17 using namespace boost::asio::ip
;
18 //using namespace raggin;
21 typedef shared_ptr
<Y
> Yptr
;
23 class Y
: public enable_shared_from_this
<Y
>
36 asio::io_service io_service
;
40 Yptr ptr
= yp
->shared_from_this();
43 asio::io_service io_service;
45 raggin::socket socket(io_service);
47 socket.send(asio::buffer("test!"));
49 vector<char> vecbuf(4);
50 socket.receive(asio::buffer(vecbuf));
51 cout << string(vecbuf.begin(), vecbuf.end()) << endl;
58 cerr
<< ex
.what() << endl
;