No description or website provided.
Ruby C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
include/mruby
mrblib
src
.gitignore
LICENSE
README.md
mrbgem.rake

README.md

mruby-websockets

You need to have libressl installed, on macOS this can be easily done with homebrew. Then add

  conf.gem mgem: 'mruby-websockets' do |g|
    g.cc.include_paths << '/usr/local/opt/libressl/include'
    g.linker.library_paths << '/usr/local/opt/libressl/lib'
  end

to your build_config.rb

Example

client = WebSocket::Client.new(:ws, "echo.websocket.org", 80, "/")
client.send "hallo"
client.recv
client.close

wss Example

client = WebSocket::Client.new(:wss, "echo.websocket.org", 443, '/', ciphers: 'TLSv1.2') # needed for amazon web services
client.send "hallo"
client.recv
client.close