1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Gun do
6 @behaviour Pleroma.Gun.API
26 def open(host, port, opts \\ %{}), do: :gun.open(host, port, Map.take(opts, @gun_keys))
29 defdelegate info(pid), to: :gun
32 defdelegate close(pid), to: :gun
35 defdelegate await_up(pid), to: :gun
38 defdelegate connect(pid, opts), to: :gun
41 defdelegate await(pid, ref), to: :gun
43 @spec flush(pid() | reference()) :: :ok
44 defdelegate flush(pid), to: :gun