Register 0 op in TCPSelectorHandler

View: New views
3 Messages — Rating Filter:   Alert me  

Register 0 op in TCPSelectorHandler

by Sebastian Dehne-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys,

I'm trying to run grizzly on a non-Sun JVM and run into a problem which
is caused by registering 0 as an channel operation. The problem is
triggered at TCPSelectorHandler line 462 where 0 is applied as an
argument to register().

SocketChannel.validOps() returns which operations are valid and 0 is not
one of them.

I'm using a patch where I just use SelectionKey.OP_WRITE instead of 0,
which works fine for me and also passes all unit tests.

Any suggestions?


Thanks
Sebastian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Register 0 op in TCPSelectorHandler

by Sebastian Dehne-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, forgot to mention I'm using version 1.9.15b. This will also match
the line number below. But it seems the same problem exists on trunk.

Sebastian Dehne wrote:

> Hi guys,
>
> I'm trying to run grizzly on a non-Sun JVM and run into a problem which
> is caused by registering 0 as an channel operation. The problem is
> triggered at TCPSelectorHandler line 462 where 0 is applied as an
> argument to register().
>
> SocketChannel.validOps() returns which operations are valid and 0 is not
> one of them.
>
> I'm using a patch where I just use SelectionKey.OP_WRITE instead of 0,
> which works fine for me and also passes all unit tests.
>
> Any suggestions?
>
>
> Thanks
> Sebastian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Register 0 op in TCPSelectorHandler

by Oleksiy Stashok :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sebastian,

> I'm trying to run grizzly on a non-Sun JVM and run into a problem  
> which is caused by registering 0 as an channel operation. The  
> problem is triggered at TCPSelectorHandler line 462 where 0 is  
> applied as an argument to register().
> SocketChannel.validOps() returns which operations are valid and 0 is  
> not one of them.
>
> I'm using a patch where I just use SelectionKey.OP_WRITE instead of  
> 0, which works fine for me and also passes all unit tests.
>
> Any suggestions?
I think registering 0 should work fine, because it actually means  
deregister *all* interests. Do you see any exception, when registering  
0 interest?

Thanks.

WBR,
Alexey.

>
>
> Thanks
> Sebastian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...