September 24th, 1999, 06:03 AM
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();
}
}
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();
}
}