CORBA 2.3.3 Programmer's Guide for C++

workCompleted.lock();
workCompleted.signal();
workCompleted.unlock();
}
The wait_for_completion() method is used to wait for the client-wrapper factory object to complete its
work:
void
Client_Wrapper::Factory::wait_for_completion()
{
workCompleted.lock();
workCompleted.wait();
workCompleted.unlock();
}
When OPEN messages arrive on $RECEIVE, the event handler invokes the factorys connect_in() method.
The connect_in() method creates a worker to service that connection.
Client_Wrapper::Factory::~Factory()
{}
// Got a connect indication; create a new worker object to
// handle the connection. Have the worker object accept
// the connection.
void
Client_Wrapper::Factory::connect_in (void *pp_client_key)
{}
void Client_Wrapper::Worker::handle_event (NSDEFw_GFS::Server::Event *event)
{ ...
}
5.
As previously noted, a new worker is created to handle each new OPEN message. The worker object is a server
event-handler user (NSDEFw_GFS::Server::EH_User).
The worker's data_in() method is invoked when an I/O event is completed. For each WRITEREAD event, the worker
creates a new worker thread to process the WRITEREAD request.
Caution
The same NonStop CORBA server (for example, your client wrapper) cannot receive Pathsend requests from both
NonStop CORBA clients and legacy clients. Attempts to send both types of requests to the same process have
unpredictable results.
Writing a Client Wrapper for a Remote (TCP/IP) Client
The client wrapper for a remote (TCP/IP) client is similar to that for a context-free Pathsend requester. The client
wrapper cooperates with the NonStop CORBA event framework using two objects, a factory and a servant (worker). The
factory is a listener event-handler user, and the worker is a server event-handler user.
A client wrapper for a legacy TCP/IP client operates as follows:
Creates a factory object, inheriting from Fw_Listener_EH_User.1.
The factory object creates a socket listener event-handler object (Fw_Sock_Listener_EH) and associates itself
with that event-handler object as its user.
2.
The factory object invokes the start_listening() method on the event handler to register interest in3.