Subject: [BEEPwg] About beep output and input stream

From: "Russell Hung" <[email-masked]>
Date: Tue, 6 Aug 2002 11:44:22 -0700

Hi,
 
I have a question about the input and output stream of BEEP. I read the
example on the book, "BEEP", written by Dr. Marshall T. Rose and
published by O'Reilly. There is a client example on page 52:
 
try {
    channel.sendMSG(new StringOutputDataStream(request), reply);
} catch { ....}
 
InputDataStream ds = reply.getNextReply().getDataStream();
InputStream is = ds.getInputStream();
 
while(is.read() != -1) {
    ++replyLength;
} 
 
It uses the message reply object to get the input stream. That means we
have to send a message and wait for the response. This is not what I
want. What I need are two independent threads: one for listening to the
port/messages and one for sending out the message through the port. Is
there any way to have an independent InputStream? Thanks. 
 
Best Regards,
 
Russell Hung
[email-masked]

---

From: "Marshall Rose" <[email-masked]>
Date: Tue, 6 Aug 2002 12:52:32 -0700

Messagehi. please send your note to [email-masked]... and maybe someone there can answer it.

/mtr
  ----- Original Message ----- 
  From: Russell Hung 
  To: [email-masked] 
  Sent: Tuesday, August 06, 2002 11:44 AM
  Subject: [BEEPwg] About beep output and input stream

  Hi,

  I have a question about the input and output stream of BEEP. I read the example on the book, "BEEP", written by Dr. Marshall T. Rose and published by O'Reilly. There is a client example on page 52:

  try {

  while(is.read() != -1) {
      ++replyLength;
  } 

  It uses the message reply object to get the input stream. That means we have to send a message and wait for the response. This is not what I want. What I need are two independent threads: one for listening to the port/messages and one for sending out the message through the port. Is there any way to have an independent InputStream? Thanks. 

  Best Regards,

  Russell Hung