• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSSE and NIO

 
Simon Dansereau
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to implement secure (https) non-blocking communication.
I want to use java.nio with JSSE.

I found a paper on that subject (http://www-106.ibm.com/developerworks/java/library/j-sslnb.html?ca=dgr-lnxw16JSSE-NIO) and tried to run the example program.

Unfortunately, when I run the program, the output contains many "bad characters".

When I comment this line : s.setSoTimeout(25); in nbChannel.java, the output is OK.

I think the SocketTimeoutException that is throw corrupts the socket and prevents it from decoding the
HTTPS response correctly???

But the problem is that the nbChannel becomes a blocking one if I remove
the timeout !!

I really need to use JSSE and NIO(non-blocking) in my application.
Does anyone have an idea ?
Is this a bug ?
Do you get the same results (bad characters) ?

Here is the code :




 
Simon Dansereau
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!