Packages
pigeon
1.1.4
2.0.1
2.0.0
2.0.0-rc.3
2.0.0-rc.2
2.0.0-rc.1
2.0.0-rc.0
1.6.3
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.1.0-rc.1
1.1.0-rc.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.13.1
0.13.0
0.12.1
0.12.0
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.1
0.9.0
0.8.0
0.7.0
0.6.0
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
iOS (APNS), Android (FCM), and Amazon Android (ADM) push notifications for Elixir.
Current section
Files
Jump to
Current section
Files
lib/pigeon/configurable.ex
defprotocol Pigeon.Configurable do
@type sock :: {:sslsocket, any, pid | {any, any}}
@doc ~S"""
Returns worker name for config.
## Examples
iex> worker_name(%Pigeon.APNS.Config{name: :test})
:test
iex> worker_name(%Pigeon.FCM.Config{name: :another})
:another
"""
@spec worker_name(any) :: atom | nil
def worker_name(config)
@spec connect(any) :: {:ok, sock} | {:error, String.t}
def connect(config)
def push_headers(config, notification, opts)
def push_payload(config, notification, opts)
def handle_end_stream(config, stream, notification, on_response)
@spec max_demand(any) :: non_neg_integer
def max_demand(config)
@doc ~S"""
Schedules connection ping if necessary.
## Examples
iex> schedule_ping(%Pigeon.APNS.Config{ping_period: 2})
iex> receive do
...> :ping -> "Got ping!"
...> after
...> 5000 -> "No ping received."
...> end
"Got ping!"
iex> schedule_ping(%Pigeon.FCM.Config{})
iex> receive do
...> :ping -> "Got ping!"
...> after
...> 5000 -> "No ping received."
...> end
"No ping received."
"""
@spec schedule_ping(any) :: no_return
def schedule_ping(config)
def close(config)
end