From amir.eliaz at traffixsystems.com Thu Mar 1 02:23:10 2012 From: amir.eliaz at traffixsystems.com (Amir Eliaz) Date: Thu, 1 Mar 2012 12:23:10 +0200 Subject: [sctp-dev] SCTP in blocking mode Message-ID: Hello, We are trying to have Sctp perform in blocking mode. >From the Javadoc we understand it's supported, but we're unable to make it work as we keep getting IllegalBlockingModeExceptions. Using configureBlocking(true) will cause register() to fail, so we tried to surround the calls to send() with configureBlocking(true/false). This also caused the exception immediately. Any help will be appreciated. Thanks, --Amir -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20120301/f8ae15c6/attachment.html From Alan.Bateman at oracle.com Thu Mar 1 02:27:22 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 01 Mar 2012 10:27:22 +0000 Subject: [sctp-dev] SCTP in blocking mode In-Reply-To: References: Message-ID: <4F4F4F0A.5030909@oracle.com> On 01/03/2012 10:23, Amir Eliaz wrote: > > Hello, > > We are trying to have Sctp perform in blocking mode. > > From the Javadoc we understand it's supported, but we're unable to > make it work as we keep getting IllegalBlockingModeExceptions. > > Using configureBlocking(true) will cause register() to fail, so we > tried to surround the calls to send() with configureBlocking(true/false). > > This also caused the exception immediately. > > Any help will be appreciated. > > Thanks, > > --Amir > You can't use channels configured blocking with Selectors. -Alan. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20120301/28988220/attachment.html From amir.eliaz at traffixsystems.com Thu Mar 1 04:54:16 2012 From: amir.eliaz at traffixsystems.com (Amir Eliaz) Date: Thu, 1 Mar 2012 14:54:16 +0200 Subject: [sctp-dev] SCTP in blocking mode In-Reply-To: <4F4F4F0A.5030909@oracle.com> References: <4F4F4F0A.5030909@oracle.com> Message-ID: Thanks Alan. Yes, we are aware of this. We thought there is a way to have Sctp use oio sockets in blocking mode. But it looks impossible since the whole API is based on nio and we couldn?t find any oio sctp implementation. That led me to wonder why the project's Javadoc mentions non-blocking mode in several APIs. --Amir From: Alan Bateman [mailto:Alan.Bateman at oracle.com] Sent: Thursday, March 01, 2012 12:27 PM To: Amir Eliaz Cc: sctp-dev at openjdk.java.net Subject: Re: [sctp-dev] SCTP in blocking mode On 01/03/2012 10:23, Amir Eliaz wrote: Hello, We are trying to have Sctp perform in blocking mode. >From the Javadoc we understand it's supported, but we're unable to make it work as we keep getting IllegalBlockingModeExceptions. Using configureBlocking(true) will cause register() to fail, so we tried to surround the calls to send() with configureBlocking(true/false). This also caused the exception immediately. Any help will be appreciated. Thanks, --Amir You can't use channels configured blocking with Selectors. -Alan. -- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20120301/89e4c67b/attachment.html From Alan.Bateman at oracle.com Thu Mar 1 04:57:45 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 01 Mar 2012 12:57:45 +0000 Subject: [sctp-dev] SCTP in blocking mode In-Reply-To: References: <4F4F4F0A.5030909@oracle.com> Message-ID: <4F4F7249.3010905@oracle.com> On 01/03/2012 12:54, Amir Eliaz wrote: > > Thanks Alan. > > Yes, we are aware of this. We thought there is a way to have Sctp use > oio sockets in blocking mode. > > But it looks impossible since the whole API is based on nio and we > couldn?t find any oio sctp implementation. > > That led me to wonder why the project's Javadoc mentions non-blocking > mode in several APIs. > > --Amir > > When you say "oio", do you mean the classic networking APIs, as in Socket and ServerSocket? The SCTP API that is included in the JDK is based on NIO. This means it can be used in both blocking and non-blocking mode. When multiplexing (via a Selector) then the channels have to configured non-blocking. -Alan. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/sctp-dev/attachments/20120301/8971901f/attachment.html