It is okay, I now clearly understand this usage. Thank you for helping me to understand the WebSocket Client API clearly.
Best regards. 2016-08-18 16:16 GMT+03:00 Pavel Rappo <pavel.ra...@oracle.com>: > > > On 18 Aug 2016, at 13:54, Rahman USTA <rahman.usta...@gmail.com> wrote: > > > > A WebSocket server can send any message at any time to any client, so > how a client will be able to get any message at any time with this API ? > For example, if our server pushes new stock exchange data to our client, > how can I get this multiple data from server when they come ? > > If you are not concerned about possible resources exhaustion and related > problems (which back-pressure was designed to address), the simplest would > be to > make a single request for virtually infinite amount of messages once you > obtain > a reference to a WebSocket instance: > > webSocket.request(Long.MAX_VALUE) > > -- Rahman USTA Istanbul JUG https://github.com/rahmanusta <http://www.kodcu.com/>