mosq 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mosq/client.rb +9 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21993aa2570c0e86b76f8679f33418be1ee525aa
4
- data.tar.gz: 2d8593a2f2a0aa5f3729cc8ad48037aca188d36f
3
+ metadata.gz: 0fb7d9f6a52b7740ad6b8e71678c14dc875a1d21
4
+ data.tar.gz: 122404f44d5ee206c6cde729d767e63ef04019f2
5
5
  SHA512:
6
- metadata.gz: dd8d5df58d1302edf916edda5c13a748c7a8dabdc9b6bae0940542fd7a56012bc1a3901d108e9b8e6d84a5f9b216a7a1e3c97e6e360ff8b03e837af5d4c0b1e3
7
- data.tar.gz: d38f4c462b841f04209f04ad88f3a246a17985e897ed83f3f4ac435e896559dcb8b8cefecfca7ad970821f79fe2087e2eec0900a5c6716a6945f8da3359818a2
6
+ metadata.gz: 443f4e38c1913995bcbf936d21607655b4ecd5666439ae0c0ff3dbeb14c307df908ef8c7f328f025a320c7cae37d89a1bfdb1e91b29bd81c00b7a0d24417d724
7
+ data.tar.gz: d34e741afa7f15d43d571362f83dc2f74087d64e7dc10e900874635c83b2c735b7795362e8fc62a3318d483f6f25ea4bb69f7125e180b13e6c52b35f1b2dd9c6
@@ -58,17 +58,22 @@ module Mosq
58
58
  end
59
59
  private :ptr
60
60
 
61
- # Initiate the connection with the server.
62
- # It is necessary to call this before any other communication.
63
- def start
61
+ def start_configure
64
62
  Util.error_check "configuring the maximum number of inflight messages",
65
63
  FFI.mosquitto_max_inflight_messages_set(ptr, @options[:max_in_flight])
66
64
 
67
65
  Util.error_check "configuring the username and password",
68
- FFI.mosquitto_username_pw_set(ptr, @options[:usernam], @options[:password])
66
+ FFI.mosquitto_username_pw_set(ptr, @options[:username], @options[:password])
69
67
 
70
68
  Util.error_check "connecting to #{@options[:host]}",
71
69
  FFI.mosquitto_connect(ptr, @options[:host], @options[:port], @options[:heartbeat])
70
+ end
71
+ private :start_configure
72
+
73
+ # Initiate the connection with the server.
74
+ # It is necessary to call this before any other communication.
75
+ def start
76
+ start_configure
72
77
 
73
78
  @ruby_socket = Socket.for_fd(FFI.mosquitto_socket(ptr))
74
79
  @ruby_socket.autoclose = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mosq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe McIlvain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-09 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi