Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@ircam/node-discovery

Simple Node.js utility to discover devices on a network

Install

npm install --save @ircam/node-discovery

Sequence diagram

sequenceDiagram
  participant C as Client
  participant S as Server
  C-->>C: Create udp4 socket<br />(@todo - retry on error)
  Note over C: set broadcast=true
  loop every 2s
    C->>S: DISCOVER_REQ
    break When a server responds
      S-->>C: DISCOVER_ACK
    end
  end
  Note over C: use `rinfo` as server information
  Note over C: set broadcast=false
  C->>S: CONNECT_REQ (client_payload)
  S-->>C: CONNECT_ACK (client_address, server_payload)
  Note over C: finalize configuration
  loop every 1s
    C->>S: KEEPALIVE_REQ
    S-->>C: KEEPALIVE_ACK
    break 10s timeout
      Note over C, S: reinit connection
    end
  end


Loading

License

BSD-3-Clause

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages