INNER CODE UNIT · JavaScript

client

sebastiancarlos/beachpatrol · beachmsg.js:45

  const client = connect(endpoint, () => {
    client.write(JSON.stringify(command));
  });
  const rl = createInterface({ input: client });

  // Stop iteration after timeout, if any.
  let timedOut = false;
  let timer;
  if (timeout) {
    timer = setTimeout(() => {
      timedOut = true;
      rl.close();
    }, timeout);
  }

  try {
    for await (const line of rl) {
      if (line.startsWith(ERROR_SENTINEL)) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…