Creates a flow of ByteString.
Creates a flow of ByteString. Useful when you have objects that are not JSON or String where you may have to do your own conversion.
Usage example:
val htmlStream: Source[ByteString, ByteString, NotUsed] = Flow[Html].map { html => ByteString.fromString(html.toString()) } ... Ok.chunked(htmlStream via Comet.flow("parent.clockChanged"))
Produces a flow of ByteString using Json.fromJson(_).get
from a Flow of JsValue.
Produces a flow of ByteString using Json.fromJson(_).get
from a Flow of JsValue. Calls
out to Comet.flow internally.
the javascript callback method.
a flow of ByteString elements.
Produces a Flow of escaped ByteString from a series of String elements.
Produces a Flow of escaped ByteString from a series of String elements. Calls out to Comet.flow internally.
the javascript callback method.
a flow of ByteString elements.
Create a Comet Enumeratee.
Create a Comet Enumeratee.
Type of messages handled by this comet stream.
Javascript function to call on the browser for each message.
Initial chunk of data to send for browser compatibility (default to send 5Kb of blank data)
(Since version 2.5.0) Please use Comet.flow
Helper function to produce a Comet using Akka Streams.
Please see https://en.wikipedia.org/wiki/Comet_(programming) for details of Comet.
Example: