Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Two BufferReaders with same socket  RSS feed

 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can I used two differnt BufferReaders i mean for example,
localSocket = new Socket(InetAddress.getLocalHost(),9000)
BufferedReader in = new BufferedReader()
BufferedReader kbInput = new BufferedReader()
in the same program with same socket that is with localSocket.
Thanks in advance,
Angela
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can, You can have quite a few different inputstreams in the same program. There is a practical limit but, it's operating specific and it is a configurable parameter on most operating systems.

------------------
Hope This Helps
Carl Trusiak
 
Angela Jessi
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Carl,
If I am using two different BufferedReader, i can not exceed the practical limit am i right?
Angela

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!