ffwd 0.2.2 → 0.2.3

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: 7b83d6d295f24ccd855c350f96f7b51ae087c89a
4
- data.tar.gz: 43069839db9dcad2026337c4865d23e4bf03f74b
3
+ metadata.gz: 3ab8188ceb50b7d6c8d0843c0d41cc15e2bdb2e9
4
+ data.tar.gz: ded99314a2159032e871f0426646c29960438d12
5
5
  SHA512:
6
- metadata.gz: d2a66bf892b67f376013ea6b1ab9426d241e20ebeb830fb5850ff520c0edd6b20f09296d999e7d839e54bc23f8aecad249a65ba8a04e75cdda0362156ca292d9
7
- data.tar.gz: b66d163452d86cf43c44bfbd7696e4b3c5e91dd3bd26a35a05203cf15dfb9b204025c24259cad8f6e14e903a97d1b0d37d08b862ce91373e6a86a23efe6cde6b
6
+ metadata.gz: c875d87b096ae71a0f645d63bcf2b8ec77940201aad9325b0dc432735ae83701bfba40a00ee4bc44828e479556027af49deb272a441959cfd3c399c4f49e9104
7
+ data.tar.gz: 6060dbbe25cab2e52ddc6fa67cb2b754955a936d42f28bdcf3210b2695e567b173b66be29f4b0b8837570d2249ee57619fc0c662d3f1a2c8274307eb63fdc43e
@@ -13,6 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
+ require 'socket'
16
17
  require 'eventmachine'
17
18
 
18
19
  require_relative '../../reporter'
@@ -23,9 +24,11 @@ module FFWD::UDP
23
24
  include FFWD::Reporter
24
25
 
25
26
  DEFAULT_REBIND_TIMEOUT = 10
27
+ DEFAULT_RECEIVE_BUFFER_SIZE = nil
26
28
 
27
29
  def self.prepare opts
28
30
  opts[:rebind_timeout] ||= DEFAULT_REBIND_TIMEOUT
31
+ opts[:receive_buffer_size] ||= DEFAULT_RECEIVE_BUFFER_SIZE
29
32
  opts
30
33
  end
31
34
 
@@ -52,6 +55,12 @@ module FFWD::UDP
52
55
 
53
56
  r = FFWD.retry :timeout => rebind_timeout do |a|
54
57
  @socket = EM.open_datagram_socket host, port, connection, self, core, config
58
+
59
+ if size = config[:receive_buffer_size]
60
+ log.debug "Setting receive buffer size to #{size}"
61
+ @socket.set_sock_opt Socket::SOL_SOCKET, Socket::SO_RCVBUF, size
62
+ end
63
+
55
64
  log.info "Bind on #{info} (attempt #{a})"
56
65
  log.info " config: #{config.inspect}"
57
66
  end
@@ -14,5 +14,5 @@
14
14
  # the License.
15
15
 
16
16
  module FFWD
17
- VERSION = "0.2.2"
17
+ VERSION = "0.2.3"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffwd
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
  - John-John Tedro
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-11 00:00:00.000000000 Z
12
+ date: 2014-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine