shimmer/internal/network/gun

Based upon github.com/lpil/nerf

Types

pub external type ConnectionPid
pub type Frame {
  Close
  Text(String)
  Binary(BitString)
}

Constructors

  • Close
  • Text(String)
  • Binary(BitString)
pub external type StreamReference

Functions

pub external fn await_up(
  ConnectionPid,
) -> Result(Dynamic, Dynamic)
pub fn open(host: String, port: Int) -> Result(
  ConnectionPid,
  Dynamic,
)
pub external fn open_erl(
  Charlist,
  Int,
) -> Result(ConnectionPid, Dynamic)
pub fn ws_send(pid: ConnectionPid, frame: Frame) -> Nil
pub external fn ws_upgrade(
  ConnectionPid,
  String,
  List(Header),
) -> StreamReference
Search Document