Code Comments
Programming Forum and web based access to our favorite programming groups.I have done a Acceptor and a connector. mySvcH will send buffer to the EiSer
vieH classen. This class will send the Buffer
back to the another Client.
My Problem is because mySvcH has a thread and in this Thread when this class
get info he will put them in the EiServicH.
How Can I tell EisConnector when EiServieH is aktiv.
I creat both class As this code
ACE_INET_Addr addrToTCC(2002,"localhost"); //Det måste vara två olika port f
ör att EiClient inte skall koppla sig mot samma
ACE_Connector<mySvcH, ACE_SOCK_CONNECTOR> CONNECTOR;
Eis::SystemModule::EisConnector eisClient;
Eis::SystemModule::EisConnector *pc = &eisClient;
ACE_Time_Value timeout(3,0);
while( CONNECTOR.connect(pc,addrToTCC)==-1)
{
ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%t::%D) TCC is not aktiv \n" )));
ACE_OS::sleep (timeout);
}
//Code to create class EiServiceH becase this class will send the informat
ion this class get from mySvcH to another Client
ACE_INET_Addr addr(2001);
typedef ACE_Acceptor< Eis::SystemModule::EiServiceH,ACE_SOCK_A
CCEPTOR> EisC
lientAcceptor;
EisClientAcceptor eisClientAcceptor;
if(eisClientAcceptor.open(addr)==-1)
return 1;
Post Follow-up to this messageThis paper describes a pair of patterns that enhance the reuse, extensibilit y, and portability of object-oriented communication software by permittingne twork services to evolve independently of the mechanisms used to establish c onnections used by the services. The Acceptor and Connector patterns decoupl e the passive and active establishment of a connection, respectively, from t he service performed once the connection is established. In addition, the pa tterns decouple the service creation and concurrency strategies from the ser vices themselves. ________________
Post Follow-up to this messageWell wonderful work.. jackspar. ___________ Las vegas shows Term Life Insurance
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.