hare v0.2.2 Hare.Core.Chan
This module defines the Hare.Core.Chan
struct that represents
an open channel and provides functions to interact with it.
Summary
Functions
Closes the given channel
Establishes a link with the given channel process
Monitors the given channel process
It buids a new Hare.Core.Chan
struct from an adapter’s channel representation
and the adapter itself
It opens a new connection on the given connection process
Configures the Quality Of Service
Register a handler to deal with returned messages
Unlinks the given channel process fron the caller. If they are not linked it does nothing
Remove the return handler, if it exists. Does nothing if there is no such handler
Types
Functions
Closes the given channel.
The channel should not be used after calling this function.
Establishes a link with the given channel process.
Monitors the given channel process.
It buids a new Hare.Core.Chan
struct from an adapter’s channel representation
and the adapter itself.
This function is not meant to be called directly, but from a Hare.Core.Conn
module.
Use open/1
to open new channels.
open(conn :: GenServer.server, timeout) :: {:ok, t} | {:error, reason :: term}
It opens a new connection on the given connection process.
The connection process is expected to be a instance of the Hare.Core.Conn
module.
If the connection is not established, it blocks until it is established. A timeout in ms may be specified for this operation (5 seconds by default).
Configures the Quality Of Service.
It delegates the given options to the underlying adapter. The format of these options depends on the adapter.
Unlinks the given channel process fron the caller. If they are not linked it does nothing.
Remove the return handler, if it exists. Does nothing if there is no such handler.