title: How can I read from a net.socket in an electron app
body: <p>I have the following code in Electron backend, it works fine:</p>
  <pre><code>var client:any = new net.Socket();
  
  client.connect(10, IPAddress, function() {
  
  client.write(myDataBuffer);
  
  client.end();
  }
  </code></pre>
  <p>This works fine, my C# server receives myDataBuffer, all is good.</p>
  <p>My question is, after the .write line, how can I put a .read line?</p>
  <p>My server will write some data back and I want to block here until a read is completed?</p>
  <p>Also, can I set a read timeout here?</p>
  <p>(I do this easily in C# but am a bit new to sockets in JavaScript).</p>
  <p>Thanks.</p>