Sexy.TDL.Handler (Sexy v0.9.13)

Copy Markdown View Source

GenServer that deserializes TDLib JSON into Elixir structs and forwards them to the app.

Receives raw JSON strings from Sexy.TDL.Backend, decodes them, and recursively converts nested @type objects into the corresponding Sexy.TDL.Object.* structs.

Started automatically by Sexy.TDL.Riser — not called directly.

Event types

The handler forwards three kinds of messages to app_pid:

  • {:recv, struct} — deserialized TDLib object (e.g. %Sexy.TDL.Object.UpdateNewMessage{})
  • {:proxy_event, text} — proxychains output lines
  • {:system_event, type, details} — port failures, exits, missing proxy config

Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

init(session)

Callback implementation for GenServer.init/1.

start_link(session_name)