Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Do A acceptor and Connector in the C++
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;

Report this thread to moderator Post Follow-up to this message
Old Post
tanha22
09-19-08 12:08 PM


Re: Do A acceptor and Connector in the C++
This 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. 

________________

Report this thread to moderator Post Follow-up to this message
Old Post
ms tony
10-04-08 01:43 PM


Re: Re: Do A acceptor and Connector in the C++
Well wonderful work..

jackspar.
___________
Las vegas shows Term Life Insurance

Report this thread to moderator Post Follow-up to this message
Old Post
jackspar
10-11-08 11:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Software Engineering archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:21 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.