$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-10-26 13:23:55
Peter Dimov wrote:
> Try something along the lines of:
>
> class DaemonThread
> {
> private:
>
> int cfd_;
[...]
... if you need a class for other reasons; remember that you can use a
function taking an argument:
void daemon_thread( int fd );
> void mainloop()
> {
> while( 1 )
> {
> int fd = accept();
boost::thread th( boost::bind( daemon_thread, fd ) );
> }
> }