Split.Sockets.Conn (split v0.2.0-rc.0)

Represents a TCP socket connection to the Splitd daemon.

Summary

Types

@type t() :: %Split.Sockets.Conn{
  opts: keyword(),
  socket: port() | nil,
  socket_path: String.t()
}

Functions

@spec connect(t()) :: {:ok, t()} | {:error, t(), term()}
Link to this function

disconnect(conn)

@spec disconnect(t()) :: t()
@spec is_open?(t()) :: boolean()
Link to this function

new(socket_path, opts \\ [])

@spec new(
  String.t(),
  keyword()
) :: t()
Link to this function

send_message(conn, message)

@spec send_message(t(), term()) :: {:ok, t(), term()} | {:error, t(), term()}
Link to this function

transfer_ownership(conn, pid)

@spec transfer_ownership(t(), pid()) :: {:ok, t()} | {:error, term()}