TCP issue
Hi,
I'm using Boost Asio library to send data to the server over TCP in my plugin. Here is piece of code I'm trying to run from Render() function:
boost::asio::io_service aios;
boost::asio::ip::tcp::endpoint ep(boost::asio::ip::address::from_string("127.0.0.1"), 8000); // use localhost and port 8000
boost::asio::ip::tcp::socket sock(aios);
sock.connect(ep);
sock.send(boost::asio::buffer(message));
This code crashes in the last line with the following error message: "The system detected an invalid pointer address in attempting to use a pointer argument in a call".
In the same time this code works fine from the standalone application. Moreover, if I run this standalone applicaion as a child process from Render() function, all things work correctly.
What may be the reason of the described behavior?
Thanks,
Ilia