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

djh danjhiggi at gmail.com
Fri Jul 20 15:28:24 CDT 2007

I'm following the examples in the "ACE Programmer's Guide". 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

Stated again, I get the Connector Acceptor to work perfectly. Then I
drop the following 3 lines of code into the Connector's
	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.

$ 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)

More information about the Ace-users mailing list