Hi, On Thu, Jun 2, 2016 at 12:27 PM, Pavel Rappo <pavel.ra...@oracle.com> wrote: > OK. The only thing is that I would leave returned CS from onPing/onPong. > Remember we discussed that CompletionStage (or CompletableFuture) serves the > purpose of an asynchronous feedback: "Hey, I'm done with this data". I think > this way an implementation has more power in optimizing internal buffer pools, > etc. I don't see any harm in that. My guess, most of the time these methods > won't be overridden.
Well, consider that Ping is a control frame, and thus it can only be at most 125 bytes long. The requirement of handling its payload asynchronously can be perhaps dropped: the implementation can just copy those bytes and pass them to the application, and not worry about buffer recycling. In any case, your call, I'm fine with either solution. -- Simone Bordet http://bordet.blogspot.com --- Finally, no matter how good the architecture and design are, to deliver bug-free software with optimal performance and reliability, the implementation technique must be flawless. Victoria Livschitz