Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio multiprocess
From: Igor R (boost.lists_at_[hidden])
Date: 2011-03-02 03:06:44


> Thank you for your reply,what do you mean with native_type ? is a boost function?

It's a member function of asio objects. Eg., calling
yourSocket.native_type() gives you a native socket handle.
In versions prior ro 1.46 it's called native_handle(), IIRC.

> I need to make a multi process TCP Server..so I think it is mandatory to me
> to "parallelize" the server with process...are you sure that is enough to
> use the asynchronous model?

Well, I don't know where your requirements come from and what you do
in your "process_it()" function. If it's an excercise in making
multiple processes with fork(), or if you have heavy processing task
and cannot enqueue it to a dedicated thread for some reason -- then
you probably don't have a choice.
But note that your solution is non-portable and not scalable. Think
what happens with your server under high load - say, 10000 incoming
requests. Are you sure launching 10000 processes would be a good idea?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net