You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can be naive, but this looks like a reasonable thing to do. Can anyone explain why wasn't this done?
From a first glance this cannot be done because of two reasons:
UnixServerSocketChannel extends NativeServerSocketChannel, while NativeServerSocketChannel cannot extend ServerSocketChannel, because it does not bind to socket-addresses but file-descriptors. Could UnixServerSocketChannel extend ServerSocketChannel directly while sharing code with NativeServerSocketChannel in a different way?
While ServerSocketChannel#validOps() are only SelectionKey.OP_ACCEPT, the UnixServerSocketChannel#validOps() are SelectionKey.OP_ACCEPT | SelectionKey.OP_READ for some reasons I don't understand. I have tried changing it to SelectionKey.OP_ACCEPT, but the tests still pass (so do NativeServerSocketChannel tests). Why is SelectionKey.OP_READ required there?
The text was updated successfully, but these errors were encountered:
I can be naive, but this looks like a reasonable thing to do. Can anyone explain why wasn't this done?
From a first glance this cannot be done because of two reasons:
UnixServerSocketChannel
extendsNativeServerSocketChannel
, whileNativeServerSocketChannel
cannot extendServerSocketChannel
, because it does not bind to socket-addresses but file-descriptors. CouldUnixServerSocketChannel
extendServerSocketChannel
directly while sharing code withNativeServerSocketChannel
in a different way?ServerSocketChannel#validOps()
are onlySelectionKey.OP_ACCEPT
, theUnixServerSocketChannel#validOps()
areSelectionKey.OP_ACCEPT | SelectionKey.OP_READ
for some reasons I don't understand. I have tried changing it toSelectionKey.OP_ACCEPT
, but the tests still pass (so doNativeServerSocketChannel
tests). Why isSelectionKey.OP_READ
required there?The text was updated successfully, but these errors were encountered: