rxio 0.13.7 → 0.13.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ba978c3b4a32fa7123729faa8a8ef9b9a349f3d
4
- data.tar.gz: ae1ba6d9308798d554e1420a611ba84cebdf0f69
3
+ metadata.gz: 18bc4262038bb35d3bc783c5a54697d654762510
4
+ data.tar.gz: f47b9712ac1a9c82293f5bb60d73733975826825
5
5
  SHA512:
6
- metadata.gz: cb4749f998fc6afc4b4919c2944edd1bdc8d105bd2ad4fef25a70fd6e7c603bc56da7cab752a40d3f94a857399c2926bb82b0eaced70f9a5c613ff0f504556f4
7
- data.tar.gz: 91f54ed3418905a5704beda6ecdb900b64b84408dcfcd0b9f741003e2fdd85475b54eabe7d2c85ebdaa2f3981b54e2d9bed07fb23ac6a60afd64b9e72c064fbf
6
+ metadata.gz: f5614445d46e496f223df75f7226530ca376f0347a4a9f80c758c55fb270c81fef4c61ef877490795ad89b8e501cd618d413dd4ba64f070aac5e8ae2094819a0
7
+ data.tar.gz: 7b0f94692c4edee68e03085cc450edfd2e70e766015f848a8fe268db31035645ecb4fe4c35bdbf464cdb1cbcaddfe8412c32f62da950618909cca3f3e9575858
data/README.md CHANGED
@@ -309,16 +309,15 @@ es.shutdown
309
309
  puts 'Client has terminated!'
310
310
  ```
311
311
 
312
- ### Dealing with Peer Errors
312
+ ### Dealing with Peer Errors
313
313
 
314
314
  Whenever an error occurs as the result of handling a peer's message, it should be notified through the *peer_error* method in *RxIO::IOBase* (included in *RxIO::Service*).
315
- The default implementation of this method simply spits out the error on STDOUT and drops the peer.
315
+ The default implementation of this method simply drops the peer.
316
316
  It can be overloaded to provide custom functionality such as proper logging or more complex logic.
317
317
 
318
318
  ```ruby
319
319
  # Default implementation for 'peer_error'
320
320
  def peer_error p, e
321
- puts "[!] ERROR [#{p[:peer][:addr]}:#{p[:peer][:port]}] - #{e}"
322
321
  drop_endpoint p
323
322
  end
324
323
  ```
@@ -15,7 +15,7 @@ module RxIO
15
15
  def write endpoint, *data
16
16
 
17
17
  # Add Data Chunks to Buffer
18
- data.each { |c| endpoint[:lock].synchronize { endpoint[:obuf] << c } }
18
+ data.each { |c| endpoint[:lock].synchronize { endpoint[:obuf] << c.to_s } }
19
19
  end
20
20
 
21
21
  # Buffer Input Chunk:
data/lib/rxio/io_base.rb CHANGED
@@ -92,9 +92,8 @@ module RxIO
92
92
  # Peer Error:
93
93
  # Handles an Error from a Peer.
94
94
  # @param [Hash] p Endpoint Hash
95
- # @param [String] e Error String
96
- def peer_error p, e
97
- puts "[!] ERROR [#{p[:peer][:addr]}:#{p[:peer][:port]}] - #{e} - #{e.backtrace.collect { |b| " * #{b}" }.join "\n"}"
95
+ # @param [Exception] e Exception
96
+ def peer_error p, _e
98
97
  drop_endpoint p
99
98
  end
100
99
  end
data/lib/rxio/version.rb CHANGED
@@ -5,5 +5,5 @@
5
5
  module RxIO
6
6
 
7
7
  # Version
8
- VERSION = '0.13.7'
8
+ VERSION = '0.13.8'
9
9
  end
data/lib/rxio.rb CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  # Internal Includes
5
5
  require 'rxio/version'
6
+ require 'rxio/io_base'
6
7
  require 'rxio/handler_base'
7
8
  require 'rxio/io_filters'
8
9
  require 'rxio/service'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.7
4
+ version: 0.13.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eresse