https://github.com/asmod4n/mruby-websockets
A simple websockets clients for mruby
https://github.com/asmod4n/mruby-websockets
http mruby websockets
Last synced: 9 months ago
JSON representation
A simple websockets clients for mruby
- Host: GitHub
- URL: https://github.com/asmod4n/mruby-websockets
- Owner: Asmod4n
- License: apache-2.0
- Created: 2015-07-17T10:20:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T10:50:14.000Z (almost 2 years ago)
- Last Synced: 2025-04-07T03:34:36.321Z (10 months ago)
- Topics: http, mruby, websockets
- Language: Ruby
- Homepage:
- Size: 28.3 KB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mruby-websockets
You need to have libressl installed, on macOS this can be easily done with homebrew.
Then add
```ruby
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
===========
```ruby
client = WebSocket::Client.new("echo.websocket.org", 443, '/', ciphers: 'TLSv1.2')
client.send "hallo"
client.recv
client.close
```