Connecting Tech Pros Worldwide Help | Site Map

Peek keyboard-buffer OR a problem with _getts

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 05:55 PM
Pelle
Guest
 
Posts: n/a
Default Peek keyboard-buffer OR a problem with _getts

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.

  #2  
Old July 19th, 2005, 05:56 PM
Attila Feher
Guest
 
Posts: n/a
Default 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


  #3  
Old July 19th, 2005, 05:56 PM
Alexander Terekhov
Guest
 
Posts: n/a
Default 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.
  #4  
Old July 19th, 2005, 05:56 PM
Attila Feher
Guest
 
Posts: n/a
Default 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


  #5  
Old July 19th, 2005, 05:56 PM
Buster
Guest
 
Posts: n/a
Default 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?


  #6  
Old July 19th, 2005, 05:59 PM
Attila Feher
Guest
 
Posts: n/a
Default 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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.