ghazel-em-apn 0.0.3.1 → 0.0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/em-apn/feedback_connection.rb +8 -4
- data/lib/em-apn/version.rb +1 -1
- data/spec/em-apn/client_spec.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 098d0d6b13af09bc82922cf43ea69135a4cbadf0
|
4
|
+
data.tar.gz: 8ef261fbfd5df33979545c1d38f3a89e86c346d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6d03c9a1a3d812c078dea4b17a2bc3df49c8346ea8066c4807453a9ddf9c34feb585527a69227c01ee4a3c2300b84c5f6c1eb83d39b251595782c9b767bfcb4
|
7
|
+
data.tar.gz: 2bccd5bb54fdf31a785b7c43f7b5ebc39a413cfdcc4e574940b6b9165e6152bd670356434c8fc346183848a5d878e33cb82cd9e37822b2e06e67e979c93288cc
|
@@ -14,6 +14,7 @@ module EventMachine
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def post_init
|
17
|
+
@buf = ''
|
17
18
|
start_tls(
|
18
19
|
:private_key_file => client.key,
|
19
20
|
:cert_chain_file => client.cert,
|
@@ -26,11 +27,14 @@ module EventMachine
|
|
26
27
|
end
|
27
28
|
|
28
29
|
def receive_data(data)
|
29
|
-
|
30
|
-
|
30
|
+
@buf << data
|
31
|
+
while @buf.size >= 38
|
32
|
+
attempt = FailedDeliveryAttempt.new(@buf.slice!(0,38))
|
33
|
+
EM::APN.logger.warn(attempt.to_s)
|
31
34
|
|
32
|
-
|
33
|
-
|
35
|
+
if client.feedback_callback
|
36
|
+
client.feedback_callback.call(attempt)
|
37
|
+
end
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
data/lib/em-apn/version.rb
CHANGED
data/spec/em-apn/client_spec.rb
CHANGED
@@ -232,6 +232,7 @@ describe EventMachine::APN::Client do
|
|
232
232
|
client = EM::APN::Client.new
|
233
233
|
client.connect_feedback
|
234
234
|
client.on_feedback { |data | failed_attempt = data }
|
235
|
+
client.feedback_connection.receive_data(tuple.slice!(0,10))
|
235
236
|
client.feedback_connection.receive_data(tuple)
|
236
237
|
end
|
237
238
|
|