thanks very much for your support!!! i've understood that code, but however when i run it , i don't really see some difference, the server keeps in listening mode, blocking the execution of the rest of the code : i've added two simple line to print something on the console, and what i want is execute the server,that it keeps open in background but inmediatly execute too the printf code lines. main fuction would be :
.
.
.
.

int main()
{
  try
  {
    boost::asio::io_service io_service;
    tcp_server server(io_service);
    io_service.run();
    printf("Writting a line 1 \n");
    sleep(5);
    printf("Writting a line 2 \n");
   
  }
  catch (std::exception& e)
  {
    std::cerr << e.what() << std::endl;
  }

  return 0;
}



2009/11/9 Maxime van Noppen <maxime@altribe.org>
pedro chaparro wrote:
> Hi, i need to use a server inside of other code application, i take the
> example from
> http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/tutorial/tutdaytime2/src.html
> and it works but the server stay in listening mode and there is other
> code after that i'd like continue executing, is possible tu run the
> server let's say like in a background mode?

Hi,

You should look to how asynchronous operations work :

http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/tutorial/tutdaytime3.html

--
Maxime
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users



--
Ing Pedro Alonso Chaparro Valero
Ciudad Politecnica de la Innovación
iTEAM - Mobile Communications Group
Polytechnic University of Valencia
C\ Camino de Vera S/N, Edificio 8G
46022 Valencia, Spain