[ace-users] Reading from standard input inside of a Connector

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Sun Jul 22 16:14:41 CDT 2007


Hi,

> I'm following the examples in the "ACE Programmer's Guide". 

Which examples are you referring to?

> I've set up and adapted the single threaded Acceptor Connector
> framework to fit my initial needs.
>
> Its works well. But once I try to read from the standard input stream
> in the the client Connector's handle_timeout, I get unpredictable
> behavior.
> 
> Stated again, I get the Connector Acceptor to work perfectly. Then I
> drop the following 3 lines of code into the Connector's
> handle_timeout().
>	string test.
>	cin >> test;
>	cout << test << endl;
> And even though I don't do anything with the "test" string it breaks
> the working code: the Acceptor starts receiving messed up packets on
> the Socket.
>
> I'm expecting someone to tell me that I can't interact with the C++
> input stream inside the Connector framework.
> Below is information on my development environment.

To ensure that we have proper version/platform/compiler information,
please make sure you fill out the appropriate problem report form
(PRF), which is in

$ACE_ROOT/PROBLEM-REPORT-FORM
$TAO_ROOT/PROBLEM-REPORT-FORM

or in

$ACE_ROOT/BUG-REPORT-FORM
$TAO_ROOT/BUG-REPORT-FORM

in older versions of ACE+TAO.  Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness.  If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers
to.

Thanks,

        Doug

>$ head ace/Release
>#----------------------------------------------------------------------------
>#       Release,v 4.13 2005/08/05 12:21:26 smcqueen Exp
>#
>#       Top-level Makefile for the ACE toolkit libraries, tests, and
>#       applications
>#----------------------------------------------------------------------------
>
>$ uname -a
>Linux pclinuxdjh 2.6.19-1.2911.fc6 #1 SMP Sat Feb 10 15:16:31 EST 2007
>x86_64 x86_64 x86_64 GNU/Linux
>$ g++ -v
>Using built-in specs.
>Target: x86_64-redhat-linux
>gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)
>


-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list