non-blocking sockets

C

conrad

I'm automating some things that have to
do with checks on a cisco 3750 switch.

Using the Socket class, it seems
that the socket is blocking because
I stall at the prompt for "Username"
when I connect to the switch. Is this
correct?

I was looking into Java's support for
non-blocking sockets and it seems
to have been introduced in J2SE 1.4.

If this is the case, what was used
prior to this?
 
A

Arne Vajhøj

conrad said:
I'm automating some things that have to
do with checks on a cisco 3750 switch.

Using the Socket class, it seems
that the socket is blocking because
I stall at the prompt for "Username"
when I connect to the switch. Is this
correct?

I was looking into Java's support for
non-blocking sockets and it seems
to have been introduced in J2SE 1.4.

If this is the case, what was used
prior to this?

That is correct.

You need to use NIO to do non-blocking and that was
introduced in 1.4.

Before that you had to have a thread per blocked read.

BTW, that is still the easiest paradigm for a small
number of blocked reads.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top