packet 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/packet/packet_nbio.rb +9 -3
- data/lib/packet.rb +1 -1
- metadata +2 -2
data/lib/packet/packet_nbio.rb
CHANGED
@@ -13,9 +13,15 @@ module Packet
|
|
13
13
|
def read_data(t_sock)
|
14
14
|
sock_data = []
|
15
15
|
begin
|
16
|
-
|
17
|
-
|
18
|
-
|
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
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.
|
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-
|
12
|
+
date: 2008-07-22 00:00:00 +05:30
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|