Decoder type for decoding a single event.
Decoder type for decoding a single event.
The decoder is simply a function, which allows it to be composed using the andThen and compose functions.
Encoder type for encoding a single event.
Encoder type for encoding a single event.
The encoder is simply a function, which allows it to be composed using the andThen and compose functions.
Decoder type for decoding multiple events.
Decoder type for decoding multiple events.
The decoder is simply a partial function, which allows decoders to easily by composed together using orElse.
Encoder type for encoding multiple events.
Encoder type for encoding multiple events.
The encoder is simply a partial function, which allows encoders to easily by composed together using orElse.
Implicit conversion to enrich socket io decoders for composition.
Implicit conversion to enrich socket io encoders for composition.
Implicit conversion to enrich socket io decoders for composition.
Implicit conversion to enrich socket io encoders for composition.
Implicit conversion to enrich socket io decoders for composition.
Implicit conversion to enrich socket io encoders for composition.
Create a socket.io events decoder that decodes events by event name.
Create a socket.io events decoder that decodes events by event name.
For example:
val chatDecoder = decodeByName {
case "chat message" => decodeJson[String]
}
Create a socket.io decoder that decodes a single argument as binary.
Create a socket.io decoder that decodes a single argument as JSON, to the given type T.
Create a socket.io decoder that decodes no arguments.
Create a socket.io events encoder that encodes events by type.
Create a socket.io events encoder that encodes events by type.
The function should return a tuple of the event name and the encoder to use for the event.
For example:
val chatEncoder = encodeByName[String] {
case _: String => "chat message" -> encodeJson[String]
}
Encode a single ByteString argument to binary.
Encode a single argument to JSON from the given type T.
Encode no arguments.
DSL for creating a codec for socket.io.