Node.js event loop architecture


Node.js says: I have one thread

int server = socket();bind(server, 8080);listen(server);
while(int conn = accept(server)) {  pthread_create(echo, conn)}void echo(int conn) {  char buf(4096);  while(int size = read(conn, buffer, sizeof buf)) {    write(conn, buffer,size);  }}



We offer comprehensive tech enterprise and expertise IT support. Our software development services include strategy consulting, CX design, engineering and lifecycle management of custom products, as well as system Integration.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store