mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Added large I/O message support. (#95)
This commit is contained in:
@@ -13,9 +13,9 @@ fs.appendFileSync("exects.txt", "ts:" + hpargs.ts + "\n");
|
||||
|
||||
Object.keys(hpargs.usrfd).forEach(function (key, index) {
|
||||
let userfds = hpargs.usrfd[key];
|
||||
let userinput = fs.readFileSync(userfds[0], 'utf8');
|
||||
|
||||
if (userinput.length > 0) {
|
||||
if (userfds[0] != -1) {
|
||||
let userinput = fs.readFileSync(userfds[0], 'utf8');
|
||||
// Append user input to a state file.
|
||||
fs.appendFileSync("userinputs.txt", userinput + "\n");
|
||||
fs.writeSync(userfds[1], "Echoing: " + userinput);
|
||||
|
||||
@@ -13,9 +13,11 @@ fs.appendFileSync("exects.txt", "ts:" + hpargs.ts + "\n");
|
||||
|
||||
Object.keys(hpargs.usrfd).forEach(function (key, index) {
|
||||
let userfds = hpargs.usrfd[key];
|
||||
let fileContent = fs.readFileSync(userfds[0]);
|
||||
|
||||
if (fileContent.length > 0) {
|
||||
if (userfds[0] != -1) {
|
||||
|
||||
let fileContent = fs.readFileSync(userfds[0]);
|
||||
|
||||
// Save the content into a new file.
|
||||
var fileName = new Date().getTime().toString();
|
||||
fs.writeFileSync(fileName, fileContent);
|
||||
|
||||
@@ -51,12 +51,9 @@ function main() {
|
||||
|
||||
function create_input_container(inp) {
|
||||
|
||||
let hexInp = inp.toString('hex');
|
||||
console.log("hex " + hexInp.length);
|
||||
|
||||
let inp_container = {
|
||||
nonce: (new Date()).getTime().toString(),
|
||||
input: hexInp,
|
||||
input: inp.toString('hex'),
|
||||
max_ledger_seqno: 9999999
|
||||
}
|
||||
let inp_container_bytes = JSON.stringify(inp_container);
|
||||
|
||||
Reference in New Issue
Block a user