gamqp/amqp091/internal/socket
Types
Mirrors what gamqp_ffi:classify/1 returns for active-mode messages.
pub type SocketEvent {
SocketData(BitArray)
SocketClosed
SocketFailed(String)
NotSocket
}
Constructors
-
SocketData(BitArray) -
SocketClosed -
SocketFailed(String) -
NotSocket
Values
pub fn activate(socket: Socket) -> Result(Nil, String)
Asks for the next chunk of data as a message to the owning process.
pub fn classify(message: dynamic.Dynamic) -> SocketEvent
pub fn connect(
host: String,
port: Int,
tls: option.Option(tls.TlsConfig),
timeout: Int,
) -> Result(Socket, String)
pub fn set_owner(
socket: Socket,
pid: process.Pid,
) -> Result(Nil, String)