isomorfeus-speednode 0.2.0 → 0.2.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 691d726109255befa95fe35c996b29953a990ab3dc69158792b48dcc464e4ab8
|
4
|
+
data.tar.gz: c03fad233a0f14f64f777aec3d06ba1bc352f80834ea58d9732c1029f5d7c897
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f05d8cfc7a47afca8615bad2d0e1275cc27d7b3574212956c1429246ab68ff311c026f230603ac458cd5cfcf17b9b71469649c6425da1d8ad316d264b7b81125
|
7
|
+
data.tar.gz: 34a5796088597901f908503b2be44689d0c55628008d210dbb4a051ff4a30b2c9340b3e6f15c0d9fd6842a0cf0acd68972e58c195fa4a5e38c48112962cd7c0f
|
@@ -199,9 +199,8 @@ var server = net.createServer(function(s) {
|
|
199
199
|
s.on('data', function (data) {
|
200
200
|
received_data += data;
|
201
201
|
|
202
|
-
if (received_data
|
203
|
-
|
204
|
-
var request = received_data;
|
202
|
+
if (!received_data.endsWith("\x04")) { return; }
|
203
|
+
var request = received_data.substring(0, received_data.length - 1);
|
205
204
|
received_data = '';
|
206
205
|
|
207
206
|
var input = JSON.parse(request);
|
@@ -214,7 +213,7 @@ var server = net.createServer(function(s) {
|
|
214
213
|
outputJSON = CircularJSON.stringify(result);
|
215
214
|
} else { outputJSON = JSON.stringify(['err', '' + err, err.stack]); }
|
216
215
|
}
|
217
|
-
s.write(outputJSON + '\
|
216
|
+
s.write(outputJSON + '\x04');
|
218
217
|
if (process_exit !== false) { process.exit(process_exit); }
|
219
218
|
});
|
220
219
|
});
|
@@ -11,11 +11,11 @@ module Isomorfeus
|
|
11
11
|
def execute
|
12
12
|
result = ''
|
13
13
|
message = ::Oj.dump({ 'cmd' => @cmd, 'args' => @arguments }, mode: :strict)
|
14
|
-
@socket.sendmsg(message + "\
|
14
|
+
@socket.sendmsg(message + "\x04")
|
15
15
|
begin
|
16
16
|
result << @socket.recvmsg()[0]
|
17
|
-
end until result
|
18
|
-
::Oj.load(result
|
17
|
+
end until result.end_with?("\x04")
|
18
|
+
::Oj.load(result.chop!, create_additions: false)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-speednode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.0.
|
118
|
+
rubygems_version: 3.0.3
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: ExecJS runtime, tuned for Isomorfeus.
|