Integrate tcp into Electron
This Electron application is based on the Quick Start Guide within the Electron documentation.
Electron apps use Http and websocket in most situations, while in some particular circumstances, tcp connecting is also required.
Main process of the Electron app has the whole application's event lifecycle in control, and be responsible for creating and managing BrowserWindow. CPU intensive work in main process may block event-loop and lock up all renderer process.
Seperate tcp handlers to a individual process would be better option to avoid bad performace, especially when high frequency buffer operations and encryptions/decryptions happend.
To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# open another terminal type below to listen port 9090
nc -l 9090
# Clone this repository
git clone https://github.com/Jawnkuin/electron-tcp
# Go into the repository
cd electron-tcp
# Install dependencies
npm install
# Run the app in the fisrt terminal
npm start