singe thread per connection
- From: Praki <visitprakashindia@xxxxxxxxx>
- Date: Fri, 11 Jul 2008 12:32:19 -0700 (PDT)
I need to implement the telnet using single thread for one telnet
connection. I saw one of the usage of this telnetd with four threads
for single connection. I need to open arround minimum of 500 telnet
connections. so it will not be good to have 500*4 threads. is there
any way in which i can create telnet connection with single thread for
single connection. When i say
InputStream is =new BufferedInputStream(process.getInputStream());
InputStreamReader read=new InputStreamReader(is);
BufferedReader input = new BufferedReader(read);
try {
int c;
while (0 != (c = is.read())) {
shellIo.write((char)c);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
the read gets blocked here. and also if say in the read from the
client it goes blocked, so is there any way that i can do it using
single thread
thanks in advance
k.p
.
- Follow-Ups:
- Re: singe thread per connection
- From: Corneil
- Re: singe thread per connection
- From: Peter Duniho
- Re: singe thread per connection
- Prev by Date: Re: sorting of double[][]based on a double[]
- Next by Date: Re: Tile Map Editor
- Previous by thread: sorting of double[][]based on a double[]
- Next by thread: Re: singe thread per connection
- Index(es):
Relevant Pages
|