?
-
I have a Client and two subclasses ClientA and Client B. The reading
and writing using NIO is in Client class. If I use the old IO I will
have two threads for the reading and writing but now I only have one.
If I create ClientA and then ClientB, is the total number of threads 1
or 2? If it's 2, should I then alter Client so that there is only 1 (If
so, how) ? Is that what NIO is for - to have only 1 thread?
and writing using NIO is in Client class. If I use the old IO I will
have two threads for the reading and writing but now I only have one.
If I create ClientA and then ClientB, is the total number of threads 1
or 2? If it's 2, should I then alter Client so that there is only 1 (If
so, how) ? Is that what NIO is for - to have only 1 thread?