8 Topics

Member Avatar for
Member Avatar for zekstein

I'm trying to develop an app that realises the communication between a gameserver and an applcation. My code so far is: #include <cstdlib> #include <iostream> #include <boost/bind.hpp> #include <boost/asio.hpp> #include <boost/asio/ssl.hpp> using namespace std; enum { max_length = 1024 }; class client { public: boost::asio::streambuf receive_buffer; client(boost::asio::io_service& io_service, boost::asio::ssl::context& context, …

Member Avatar for rubberman
0
1K
Member Avatar for Alxprog

The problem is that i can't manage to compile the simplest (int main(){}) boost asio program with Code Blocks. I'm using Windows 7. Googling gave me some controversial suggestions: 1) to add -lwsock32 key - Done(Compiler settings->Other options-> -lwsock32) 2) to link with ws2_32.dll and wsock32.dll - Done (Linker settings->paths …

Member Avatar for Alxprog
0
670
Member Avatar for missil9

Hello, I am currently trying to use boost asio for IPC. I ran into 2 strange issues: 1) when using the acceptor class, when I bring my process up, I get the error 'Already open' when trying to listen. The port I am trying to bind to is definitely not …

Member Avatar for missil9
0
753
Member Avatar for dupaswim

OK so I am not getting any sound on my computer right now - it is a Dell Latitude D630 and running XP service pack 3 (I believe). Point is, right now my computer does not recognize that I have any sound devices whatsoever. I had been messing with asio4all …

0
183
Member Avatar for MixedCoder

[CODE]Server::Server(boost::asio::io_service& io_service,std::string ip,short port,std::shared_ptr<ConnectionFactory> factory) : acceptor_(io_service, boost::asio::ip::tcp::endpoint(boost::asio::ip::address_v4::from_string(ip.data()), port)){ m_factory = factory; start_accept(); std::cout<<"Socket accepting connections..."<<std::endl; } Server::~Server() { } void Server::start_accept(){ boost::asio::io_service io_service; std::shared_ptr<Connection> conn = m_factory->create(io_service); acceptor_.async_accept(conn->socket(), boost::bind(&Server::handle_accept, this,conn, boost::asio::placeholders::error)); } void Server::handle_accept(std::shared_ptr<Connection> conn,const boost::system::error_code& error){ if (!error) { std::cout<<"on connected"<<std::endl; conn->OnConnected(); start_accept(); } } [/CODE] when i …

Member Avatar for lcordero
0
541
Member Avatar for MixedCoder

[CODE]class Connection { public: typedef boost::shared_ptr<Connection> pointer; static pointer create(boost::asio::io_service& io_service){return pointer(new Connection(io_service));} explicit Connection(boost::asio::io_service& io_service); virtual ~Connection(); boost::asio::ip::tcp::socket& socket(); -->>>virtual void OnConnected()=0; void Send(uint8_t* buffer, int length); bool Receive(); private: void handler(const boost::system::error_code& error, std::size_t bytes_transferred ); boost::asio::ip::tcp::socket socket_; };[/CODE] when am trying to use virtual void OnConnected()=0; it …

Member Avatar for mike_2000_17
0
432
Member Avatar for MixedCoder

is there is a tutorial about how to use boost:asio how to send how to recive , coz all the tutorials i checked is only showin me an example of server source or a client source. so please if there is one link me to it thnx alot :)

0
111
Member Avatar for dav555

I try to transmit an OpenCV IplImage from a Server (Ubuntu x64) to a Client (Win7 x64) The following code works fine if both (Client and Server) are on the same operating system. But when the server is on Ubuntu and the client on Win7 it doesn't work. The image …

Member Avatar for dav555
0
422

The End.