DIY-pcap 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -49,7 +49,8 @@ DIY::Builder.new do
49
49
  pcapfile "pcaps/simple.pcap"
50
50
  use DIY::SimpleStrategy.new
51
51
  client "x.x.x.x" # 配置客户端ip, 缺省端口为7878
52
- server "x.x.x.x" # 配置服务端ip, 缺省端口为7879, 以上都可以写为 x.x.x.x:x 的形式, 与 rpcap或pcap的 -i 参数对应
52
+ server "x.x.x.x" # 配置服务端ip, 缺省端口为7879
53
+ me "x.x.x.x" # 配置控制端ip, 缺省端口为7880, 以上都可以写为 x.x.x.x:x 的形式, 与 rpcap或pcap的 -i 参数对应
53
54
  end
54
55
  ```
55
56
  3. 使用方法( 准备三台主机或逻辑主机, 只是试验的话可以使用 `127.0.0.1` )
@@ -43,6 +43,7 @@ module DIY
43
43
  break
44
44
  end
45
45
  end
46
+ DRb.stop_service
46
47
  end_time = Time.now
47
48
  stats_result( end_time - start_time, @fail_count )
48
49
  end
@@ -1,5 +1,5 @@
1
1
  module DIY
2
2
  class PCAP
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
@@ -24,7 +24,11 @@ module DIY
24
24
  DIY::Logger.info "start thread recving pkt..."
25
25
  @live.loop do |this, pkt|
26
26
  next unless @start
27
- @block.call(pkt.body) if @block
27
+ begin
28
+ @block.call(pkt.body) if @block
29
+ rescue DRb::DRbconnError
30
+ DIY::Logger.info "closed connection by controller"
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -10,6 +10,7 @@ a = DIY::Builder.new do
10
10
  pcapfile Dir["pcaps/*.pcap"]
11
11
  client "127.0.0.1"
12
12
  server "127.0.0.1"
13
+ me "127.0.0.1"
13
14
  end
14
15
 
15
16
  a.run
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - yafei Lee