polyphony 0.63 → 0.64
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/polyphony/extensions/io.rb +2 -2
- data/lib/polyphony/extensions/openssl.rb +4 -2
- data/lib/polyphony/extensions/socket.rb +9 -10
- data/lib/polyphony/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e3938b66b15caff258b95c7f1421f71bc0bb4f7b94dd9db4a3ad0614fd35ded
|
4
|
+
data.tar.gz: 2198ea0483f959491372074007d5c32416de69ebcf73a8aca51832ea6036ea87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 318b3b2549a6d7d3c2bb1b8396adcf95109ef17f6235e25bcf1540fd3c5777d6f2666858d5f539cf17dd0c2102553eb853ba3b38b96d9476d2727a7ddfb0ed70
|
7
|
+
data.tar.gz: 025f5037c922531235bcf56076ca6986cb1d983b37eceda8e1585fa90e23f67c0abe17a81b0329851e80c050e9ccce8ba53f7a0d95565e6568546dbb923f9a25
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -123,9 +123,9 @@ class ::IO
|
|
123
123
|
end
|
124
124
|
|
125
125
|
alias_method :orig_readpartial, :read
|
126
|
-
def readpartial(len, str = +'', buffer_pos = 0)
|
126
|
+
def readpartial(len, str = +'', buffer_pos = 0, raise_on_eof = true)
|
127
127
|
result = Polyphony.backend_read(self, str, len, false, buffer_pos)
|
128
|
-
raise EOFError
|
128
|
+
raise EOFError if !result && raise_on_eof
|
129
129
|
|
130
130
|
result
|
131
131
|
end
|
@@ -78,7 +78,7 @@ class ::OpenSSL::SSL::SSLSocket
|
|
78
78
|
buf
|
79
79
|
end
|
80
80
|
|
81
|
-
def readpartial(maxlen, buf = +'', buffer_pos = 0)
|
81
|
+
def readpartial(maxlen, buf = +'', buffer_pos = 0, raise_on_eof = true)
|
82
82
|
if buffer_pos != 0
|
83
83
|
if (result = sysread(maxlen, +''))
|
84
84
|
if buffer_pos == -1
|
@@ -90,7 +90,9 @@ class ::OpenSSL::SSL::SSLSocket
|
|
90
90
|
else
|
91
91
|
result = sysread(maxlen, buf)
|
92
92
|
end
|
93
|
-
|
93
|
+
|
94
|
+
raise EOFError if !result && raise_on_eof
|
95
|
+
result
|
94
96
|
end
|
95
97
|
|
96
98
|
def read_loop(maxlen = 8192)
|
@@ -77,8 +77,9 @@ class ::Socket
|
|
77
77
|
# Polyphony.backend_send(self, mesg, 0)
|
78
78
|
# end
|
79
79
|
|
80
|
-
def readpartial(maxlen, str = +'', buffer_pos = 0)
|
81
|
-
Polyphony.backend_recv(self, str, maxlen, buffer_pos)
|
80
|
+
def readpartial(maxlen, str = +'', buffer_pos = 0, raise_on_eof = true)
|
81
|
+
result = Polyphony.backend_recv(self, str, maxlen, buffer_pos)
|
82
|
+
raise EOFError if !result && raise_on_eof
|
82
83
|
end
|
83
84
|
|
84
85
|
ZERO_LINGER = [0, 0].pack('ii').freeze
|
@@ -199,11 +200,10 @@ class ::TCPSocket
|
|
199
200
|
# Polyphony.backend_send(self, mesg, 0)
|
200
201
|
# end
|
201
202
|
|
202
|
-
def readpartial(maxlen, str = +'', buffer_pos = 0)
|
203
|
+
def readpartial(maxlen, str = +'', buffer_pos = 0, raise_on_eof)
|
203
204
|
result = Polyphony.backend_recv(self, str, maxlen, buffer_pos)
|
204
|
-
raise EOFError
|
205
|
-
|
206
|
-
str
|
205
|
+
raise EOFError if !result && raise_on_eof
|
206
|
+
result
|
207
207
|
end
|
208
208
|
|
209
209
|
def read_nonblock(len, str = nil, exception: true)
|
@@ -293,11 +293,10 @@ class ::UNIXSocket
|
|
293
293
|
Polyphony.backend_send(self, mesg, 0)
|
294
294
|
end
|
295
295
|
|
296
|
-
def readpartial(maxlen, str = +'', buffer_pos = 0)
|
296
|
+
def readpartial(maxlen, str = +'', buffer_pos = 0, raise_on_eof)
|
297
297
|
result = Polyphony.backend_recv(self, str, maxlen, buffer_pos)
|
298
|
-
raise EOFError
|
299
|
-
|
300
|
-
str
|
298
|
+
raise EOFError if !result && raise_on_eof
|
299
|
+
result
|
301
300
|
end
|
302
301
|
|
303
302
|
def read_nonblock(len, str = nil, exception: true)
|
data/lib/polyphony/version.rb
CHANGED