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 +4 -4
- data/lib/ffwd/protocol/udp/bind.rb +9 -0
- data/lib/ffwd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ab8188ceb50b7d6c8d0843c0d41cc15e2bdb2e9
|
4
|
+
data.tar.gz: ded99314a2159032e871f0426646c29960438d12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/ffwd/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|