Connecting Tech Pros Worldwide Help | Site Map

Peek keyboard-buffer OR a problem with _getts

Pelle
Guest
 
Posts: n/a
#1: Jul 19 '05
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.
Attila Feher
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Peek keyboard-buffer OR a problem with _getts


Pelle wrote:[color=blue]
> 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.[/color]

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

--
Attila aka WW


Alexander Terekhov
Guest
 
Posts: n/a
#3: Jul 19 '05

re: Peek keyboard-buffer OR a problem with _getts



Attila Feher wrote:
[...][color=blue]
> This group is for C++ _language_ issues as it is written in the
> welcome message:
>
> http://www.slack.net/~shiva/welcome.txt[/color]

Attila, this "welcome.txt" isn't a charter. At best, it's just a
bunch of electrons. http://www.lyricscafe.com/m/marque/012.htm

regards,
alexander.
Attila Feher
Guest
 
Posts: n/a
#4: Jul 19 '05

re: Peek keyboard-buffer OR a problem with _getts


Alexander Terekhov wrote:[color=blue]
> Attila Feher wrote:
> [...][color=green]
>> This group is for C++ _language_ issues as it is written in the
>> welcome message:
>>
>> http://www.slack.net/~shiva/welcome.txt[/color]
>
> Attila, this "welcome.txt" isn't a charter. At best, it's just a
> bunch of electrons. http://www.lyricscafe.com/m/marque/012.htm[/color]

Unless of course we handle it as one.

--
Attila aka WW


Buster
Guest
 
Posts: n/a
#5: Jul 19 '05

re: Peek keyboard-buffer OR a problem with _getts


> > Attila, this "welcome.txt" isn't a charter. At best, it's just a[color=blue][color=green]
> > bunch of electrons. http://www.lyricscafe.com/m/marque/012.htm[/color]
>
> Unless of course we handle it as one.[/color]

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


Attila Feher
Guest
 
Posts: n/a
#6: Jul 19 '05

re: Peek keyboard-buffer OR a problem with _getts


Buster wrote:[color=blue][color=green][color=darkred]
>>> Attila, this "welcome.txt" isn't a charter. At best, it's just a
>>> bunch of electrons. http://www.lyricscafe.com/m/marque/012.htm[/color]
>>
>> Unless of course we handle it as one.[/color]
>
> If you call a tail a leg, how many legs does a dog have?[/color]

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.

--
Attila aka WW


Closed Thread