njh / ruby-mqtt

Pure Ruby gem that implements the MQTT protocol, a lightweight protocol for publish/subscribe messaging.
http://www.rubydoc.info/gems/mqtt
MIT License
542 stars 135 forks source link

Backport OpenSSL::SSL::SSLSocket#getbyte #139

Closed tenderlove closed 2 years ago

tenderlove commented 3 years ago

This backports the getbyte method which was added in this PR:

https://github.com/ruby/openssl/pull/438

We only add the method to SSLSocket if the method isn't already defined. I was able to test this with the following program:

require 'rubygems'
require 'mqtt'

client = MQTT::Client.connect(
  host: "test.mosquitto.org",
  port: 8883,
  ssl: true
)

client.get

Fixes #135