Solved

flush buffer when using internet daemon

Posted on 2001-06-18
3
391 Views
Last Modified: 2010-04-15
I need to know how to flush the buffer when using internet dameon? I have tried fflush(stdout) but that didn't seem to work.

An example would be appreciated.
0
Comment
Question by:dorinda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:dorinda
ID: 6203093
Here is a sample of the logic I am using.  As you can see I have also tried ioctl(0,FLUSHW)

------------------------------------------------
{                                                                      
    TBuff[0] = START_OF_MSG_CHAR;                                      
                                                                       
    snprintf(buff, sizeof(buff), "%s", START_OF_MSG_CHAR);            
    write(0, TBuff, strlen(TBuff));                                    
    ioctl(0, FLUSHW);                                                  
                                                                       
    //flushq(q, 0);                                                    
    //bdflush();                                                      
                                                                       
    VBPtr = VBPtr + 1;                                                
    VBArray1[VBPtr][0] = END_OF_MSG_CHAR;                              
                                                                       
    for (x = 0; x < VBPtr + 1; x++)                                    
     {                                                                
        if (x < 241)                                                  
         {                                                            
            snprintf(buff, sizeof(VBArray1[x]), "%s", VBArray1[x]);    
            write(0, buff, strlen(buff));                              
            ioctl(0, FLUSHW);                                          
         }                                                            
     }                                                                
                                                                       
 } /* vbsend */                                                                        
0
 
LVL 1

Accepted Solution

by:
yabelson earned 100 total points
ID: 6204254
you can also try flushall() if you dont mind all of th eother buffers to flush too...  (-:


0
 

Author Comment

by:dorinda
ID: 6227882
The problem turned out to not be the buffer but an overflow on a variable.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question