CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: hello

  1. #1
    Guest

    hello


    while(m_bRun){
    try{
    sleep(5);
    if(m_istInStream.available() > 0){
    while(m_istInStream.available() > 0){
    bytFromInputStream = new byte[m_istInStream.available()];
    m_istInStream.read(bytFromInputStream);
    strTextRead = new String(bytFromInputStream);
    strTextToDisplay += strTextRead;
    }
    if(strTextToDisplay.endsWith("\n")){
    m_frmParentFrame.displayText(strTextToDisplay);
    strTextToDisplay = "";
    }
    }
    }
    catch(IOException e){
    e.printStackTrace();
    }
    catch(InterruptedException e){
    e.printStackTrace();
    }
    }





  2. #2
    Guest

    Re: hello

    woops... what I meant to ask is does anyone know how to make it so that the while loop reads more than just one character at first? (it seems like it reads one character and then has to go through the while loop again to read the rest).
    Any Ideas?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured