Skip to content

A quick example of socket communication using nodejs net library and good old emitters.

Notifications You must be signed in to change notification settings

husainkhambaty/socketcommunication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Socket Communication example

This is a quick example of communication between two server side node components communication using Sockets.

There are two pieces that can be run:

  • Master
  • Agent

Master

The Master acts like a server process that listens for connections. When an agent connects to the master, it captures some identity information and then when needed can send a message (or instruction) to the agent. The agent in-turn provides results to the master to consolidate.

node master

Agent

The Agent acts like a client that connects to the master. When connected it identifies itself and awaits for instructions.

node agent

This code is very primitive and can be expanded as needed.

About

A quick example of socket communication using nodejs net library and good old emitters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published