Skip to content

keckxde/node-disnetworkclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-disnetworkclient

Example implementations for UDP client/server exchanging DIS (Distributed Interactive Simulation) packages using open-dis-javascript with node.js

This examples may help as a starting-point to use open-dis-javascript yourself, giving a basic introduction, in how to use the DIS PDUs, and handling the different Buffers

Dependencies

Before starting, please install the following software:

Installation

Get the source:

git clone https://github.com/keckxde/node-disnetworkclient.git

Install the dependencies:

cd node-disnetworkclient
npm install

Run the examples

Example Server

Run the Server - by default listening on port 3000

npm run-script server

Result:

> node src/dis-udpserver.js

server listening 0.0.0.0:3000

Example Client

Run the Client - by default sending to localhost:3000

npm run-script client

Result:

> node src/dis-udpclient.js

UDP message sent to 127.0.0.1:3000

Verify the Message was received by the Server:

After that, you will see, a DIS EntityState PDU was sent to server

server got msg from 127.0.0.1:64528
Got EntityState: { site: 11, application: 22, entity: 33 } Location { x: 0, y: 0, z: 0 } 
Marking

Write your own client

See example implementation in dis-udpclient.js as a starting point

Write your own server

See example implementation in dis-udpserver.js as a starting point

About

Example implementations for UDP client/server exchanging DIS (Distributed Interactive Simulation) packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published