Just wondered if someone could point me some simple code which shows multi threaded boost::tcp::socket that is multi threaded that does not work off the same socket that is created by the parent I.E.
while (TRUE){
create server
create shared_ptr io_service
create shared_ptr socket
create acceptor
create endpoint
bind to ip and port
listen
accept(bind etc)
create thread pool with function passing the ONE socket
//do work in thread close the socket
}
I have found the root cause of my problem it was the fact that I did not realise that the more than one socket could bind to the same port using boost
which has helped me a lot.