Re: why cant SslTransportLayer be muted before handshake completion?

2016-11-04 Thread radai
the root issue is i may not have enough available memory to read from the socket. I'll do the simple thing and just avoid muting handshaking sockets, for now. On Wed, Nov 2, 2016 at 6:59 PM, Harsha Chintalapani wrote: > HI Radai, > One main reason is to keep the

Re: why cant SslTransportLayer be muted before handshake completion?

2016-11-02 Thread Harsha Chintalapani
HI Radai, One main reason is to keep the handshake details away from the application layer. i.e Kafka network layer which is sending Kafka protocols doesn't need to worry about the handshake details, all it needs is a validation that the connection is completed and it can start

Re: why cant SslTransportLayer be muted before handshake completion?

2016-11-02 Thread Joel Koshy
Sriharsha can validate this, but I think the reason is that if we allow muting/unmuting at will (via those public APIs) that can completely mess up the handshake itself. It should be possible to pause/resume the handshake if that's what you'r elooking for but I'm not sure it is worth it for the

why cant SslTransportLayer be muted before handshake completion?

2016-11-02 Thread radai
Hi, as part of testing my code for KIP-72 (broker memory control), i ran into the following code snippet in SslTransportLayer: public void removeInterestOps(int ops) { if (!key.isValid()) throw new CancelledKeyException(); else if (!handshakeComplete)