8000 GitHub - dominicletz/websockex at v0.2.0 · GitHub
[go: up one dir, main page]

Skip to content
dominicletzPublic

About

An Elixir Websocket Client

Topics

Resources

Stars

560 stars

Watchers

6 watching

Forks

Latest commit

 

History

155 Commits

Folders and files

Repository files navigation

WebSockex

Build Status Build status

An Elixir Websocket Client.

The simplest implemenation is

defmodule WebSocketExample do
  use WebSockex

  def start_link(url, state) do
    WebSockex.start_link(url, __MODULE__, state)
  end

  def handle_frame({type, msg}, state) do
    IO.puts "Received Message - Type: #{inspect type} -- Message: #{inspect msg}"
    {:ok, state}
  end
end

See the examples/ directory for other examples or take a look at the documentation.

Installation

  1. Add websockex to your list of dependencies in mix.exs:
def deps do
  [{:websockex, "~> 0.2"}]
end
  1. Ensure websockex is started before your application:
def application do
  [applications: [:websockex]]
end

About

An Elixir Websocket Client

Topics

Resources

Stars

560 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0