Ringbahn v0.1.0 Ringbahn.Deserializer

Provides deserialization interface like mongrel2 for zmq. Includes parsing methodology of data coming from response sockets.

Summary

Types

Body response parsed as tuple

Response tuple which will be pushed to response socket

Functions

Checks HTTP body exists in incoming data from handlers

Parses serialized response data for replying the connection

Types

body_tuple()
body_tuple() :: {integer, List.t, String.t}

Body response parsed as tuple.

response_tuple()
response_tuple() :: {Atom.t, {String.t, integer, body_tuple}}

Response tuple which will be pushed to response socket.

Functions

body_check(data)
body_check(String.t) :: boolean

Checks HTTP body exists in incoming data from handlers.

Examples

iex> Ringbahn.Deserializer.body_check("f983c23e-9058-4c9c-8cec-7f9f9a34c9ab-0 1:1, ")
false

iex> Ringbahn.Deserializer.body_check("f983c23e-9058-4c9c-8cec-7f9f9a34c9ab-0 1:1, HTTP/1.1 200 OK")
true
deserialize(data)
deserialize(String.t) :: response_tuple

Parses serialized response data for replying the connection.