Peek keyboard-buffer OR a problem with _getts

P

Pelle

Hello all,

I'm experiencing weird behaviour of _getts. I've written a rather
simple testclient (console-based) for an OPC-Server. On the first call
of _getts after a connection, the function always returns immediately,
returning an empty string. Every subsequent call to _getts is
successful as long as I don't disconnect and reconnect. However, I
can't identify any code in the (re-)connect-section that might cause
this behaviour.

In order to track this behaviour, I decided that I want to watch the
keyboard-buffer for input in order to check when exactly the suspected
"enter" is inserted into the buffer. Any ideas how that can be
accomplished? Any other ideas on the above problem?

Thanks in advance,
regards,
Carsten.
 
A

Attila Feher

Pelle said:
Hello all,

I'm experiencing weird behaviour of _getts. I've written a rather
simple testclient (console-based) for an OPC-Server. On the first call
of _getts after a connection, the function always returns immediately,
returning an empty string. Every subsequent call to _getts is
successful as long as I don't disconnect and reconnect. However, I
can't identify any code in the (re-)connect-section that might cause
this behaviour.

This _getts function (as its underscore shows) is not a standard C++
function. Furthermore standard C++ has no support for keyboard or keyboard
buffers. Unfortunately you will need to ask this question in a group
dedicated to the OS/library giving _getts. This group is for C++ _language_
issues as it is written in the welcome message:

http://www.slack.net/~shiva/welcome.txt
 
B

Buster

Attila, this "welcome.txt" isn't a charter. At best, it's just a
Unless of course we handle it as one.

If you call a tail a leg, how many legs does a dog have?
 
A

Attila Feher

Buster said:
If you call a tail a leg, how many legs does a dog have?

What is a leg is a definition. So if *everyone* calls a tail a leg the dog
will have 5 legs (assuming it has four conventional ones). I suggest you
learn to read:

Unless of course *we* handle it as one.

The *we* means *we*. And that is not Alexander and I, but people using this
newsgroup. And OTOH I really do not give a damn what we call that file.
This, and the FAQ-lite together lay down the rules and the purpose for this
newsgroup. Call them green book if you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top