packet 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,9 +13,15 @@ module Packet
13
13
  def read_data(t_sock)
14
14
  sock_data = []
15
15
  begin
16
- while(t_data = t_sock.recv_nonblock((16*1024)-1))
17
- raise DisconnectError.new(t_sock,sock_data.join) if t_data.empty?
18
- sock_data << t_data
16
+ if RUBY_PLATFORM =~ /linux/i
17
+ while(t_data = t_sock.read_nonblock((16*1024)-1))
18
+ sock_data << t_data
19
+ end
20
+ else
21
+ while(t_data = t_sock.recv_nonblock((16*1024)-1))
22
+ raise DisconnectError.new(t_sock,sock_data.join) if t_data.empty?
23
+ sock_data << t_data
24
+ end
19
25
  end
20
26
  rescue Errno::EAGAIN
21
27
  return sock_data.join
data/lib/packet.rb CHANGED
@@ -29,5 +29,5 @@ require "packet/packet_worker"
29
29
  PACKET_APP = File.expand_path'../' unless defined?(PACKET_APP)
30
30
 
31
31
  module Packet
32
- VERSION='0.1.8'
32
+ VERSION='0.1.9'
33
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: packet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hemant Kumar
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-18 00:00:00 +05:30
12
+ date: 2008-07-22 00:00:00 +05:30
13
13
  default_executable:
14
14
  dependencies: []
15
15