The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
Hi,
firstly compliments for your library.
Now i use your library into a thread of my C++ program. I've a question.
This is my piece of code (server thread):
If i connect a client, but it for a problem close the connection before receiving the response from the server, my program exit (from all threads) when i call
*client << shared_out;
...where shared_out is a variable with the value passed from the second thread.
How can i solve?
Hi, firstly compliments for your library. Now i use your library into a thread of my C++ program. I've a question. This is my piece of code (server thread):
while (1){
memset(shared_in,0,3000);
try {
unix_stream_server srv(bindpath);
unique_ptr<unix_stream_client> client;
client = srv.accept2();
client->rcv(shared_in,3000);
*client << shared_out;
}catch (const libsocket::socket_exception& exc){
std::cerr << exc.mesg;
}
}
If i connect a client, but it for a problem close the connection before receiving the response from the server, my program exit (from all threads) when i call
*client << shared_out;
...where shared_out is a variable with the value passed from the second thread. How can i solve?
Thanks a lot and Regards