Re: Special exception for EMFILE / ENFILE when using sockets.

2016-12-07 Thread Norman Maurer
ould help to translate platform specific error >> codes to common constants for common error types. >> >> >> >> Best regards >> >> Christoph >> >> >> >> *From:*net-dev [mailto:net-dev-boun...@openjdk.java.net] *On Behalf Of >&

Re: Special exception for EMFILE / ENFILE when using sockets.

2016-12-07 Thread David M. Lloyd
Bernd Eckenfels *Sent:* Montag, 5. Dezember 2016 20:09 *To:* net-dev@openjdk.java.net *Subject:* Re: Special exception for EMFILE / ENFILE when using sockets. Hello, I know it is a radical idea, but what about exposing errno value in an IOException. I do think that the new ConnectionRefus

Re: Special exception for EMFILE / ENFILE when using sockets.

2016-12-07 Thread Norman Maurer
constants for > common error types. > > Best regards > Christoph >   <> > From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of Bernd > Eckenfels > Sent: Montag, 5. Dezember 2016 20:09 > To: net-dev@openjdk.java.net > Subject: Re: Special exception

RE: Special exception for EMFILE / ENFILE when using sockets.

2016-12-06 Thread Langer, Christoph
constants for common error types. Best regards Christoph From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of Bernd Eckenfels Sent: Montag, 5. Dezember 2016 20:09 To: net-dev@openjdk.java.net Subject: Re: Special exception for EMFILE / ENFILE when using sockets. Hello, I know it is

Re: Special exception for EMFILE / ENFILE when using sockets.

2016-12-06 Thread Norman Maurer
While the idea is good I think this will not “fly” because for windows winsock is used in the JDK. Winsock does not use the same error constant as bsd sockets API (with errno). In windows we would need to expose “WSAGetLastError()” values and in unix/linux/bsd “errno” values. Sure we could try t

Re: Special exception for EMFILE / ENFILE when using sockets.

2016-12-05 Thread Bernd Eckenfels
Hello, I know it is a radical idea, but what about exposing errno value in an IOException.  I do think that the new ConnectionRefused subtype is helpful, but for each seldomly occuring error case a dedicated exception is more work than a one time mapping of native errormcodes to fields. Gruss B

Re: Special exception for EMFILE / ENFILE when using sockets.

2016-12-05 Thread Norman Maurer
> Am 05.12.2016 um 18:48 schrieb David M. Lloyd : > >> On 12/05/2016 06:29 AM, Norman Maurer wrote: >> Hi all, >> >> I wonder if it would be possible to add a new public exception time for the >> situation of an SocketChannel.accept(…) or SocketChannel.open(…) (and the >> same for ServerSock

Re: Special exception for EMFILE / ENFILE when using sockets.

2016-12-05 Thread David M. Lloyd
On 12/05/2016 06:29 AM, Norman Maurer wrote: Hi all, I wonder if it would be possible to add a new public exception time for the situation of an SocketChannel.accept(…) or SocketChannel.open(…) (and the same for ServerSocket / Socket) failing because of too many open files. The reason is beca

Special exception for EMFILE / ENFILE when using sockets.

2016-12-05 Thread Norman Maurer
Hi all, I wonder if it would be possible to add a new public exception time for the situation of an SocketChannel.accept(…) or SocketChannel.open(…) (and the same for ServerSocket / Socket) failing because of too many open files. The reason is because especially when acting as a server such an