How Do I Use An SSLServerSocket With ServerSocketChannel?
- From: Hal Vaughan <hal@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Mar 2006 11:45:13 -0500
This seems to be a tough subject. Whenever I ask questions about sockets or
selectors or nonblocking io, it is difficult to get answers -- here or
elsewhere. Is there a reason for this? I've never had that kind of
trouble with other topics.
I have a program I've been using for port forwarding and I want to be able
to use SSL and encrypt the data. I'm using non-blocking modes for the
sockets by using Selector.select(). I've noticed that it is not possible
to create a ServerSocketChannel from an existing ServerSocket, so it seems
impossible to create one with an SSLServerSocket. Is there a way to do it?
If I create a ServerSocketChannel and use ServerSocketChannel.socket() to
get the ServerSocket, then use that socket to create an SSLServerSocket, is
there a way to use that SSLServerSocket with the ServerSocketChannel for
non-blocking IO?
Or will it work to use ServerSocketChannel.accept() to get a socket when the
first connection comes in use that Socket to create an SSLSocket? And if
so, how would I use the resulting socket in non-blocking mode with a
SocketChannel?
Thanks for any help or links!
Hal
.
- Follow-Ups:
- Re: How Do I Use An SSLServerSocket With ServerSocketChannel?
- From: Thomas Weidenfeller
- Re: How Do I Use An SSLServerSocket With ServerSocketChannel?
- From: IchBin
- Re: How Do I Use An SSLServerSocket With ServerSocketChannel?
- From: Daniel Dyer
- Re: How Do I Use An SSLServerSocket With ServerSocketChannel?
- Prev by Date: Re: how to make java application executable (exe)
- Next by Date: Re: What shoudl I do to be able to read google posts w/o interference from
- Previous by thread: Create a java.util.Map in JNI
- Next by thread: Re: How Do I Use An SSLServerSocket With ServerSocketChannel?
- Index(es):