while( *(ps->active) ) {
error = ps->channels->servAccept(socket, ...);
if (!error) {
error = thread.Create(..., socket);
if(error == KErrNone)
thread.Resume(); //start the new thread
}
...
When an incoming request is accepted I want to create a new thread to handle the request and keep the other waiting for new requests. This scenario however seems impossible because I cannot pass a R-class object as a parameter to a thread function.
But my handler thread cannot handle the request without the socket that has been accepted. So this seems a dead end.
Does anyone knows a solution to this?
(Preferably not with active objects though as I would have to change a lot of already existing functionality).