resource-mesh

provides a distributed p2p event emitter mesh

npm install resource-mesh
4 downloads in the last week
8 downloads in the last month

mesh

provides a distributed p2p event emitter mesh

API

properties

methods

provides a distributed p2p event emitter mesh

  • id

    • type : any

methods

mesh.connect(options, callback)

connect to the big mesh

  • options

    • type : object

    • properties

      • port

        • type : number

        • default : 7777

        • description : the port of the node

      • host

        • type : string

        • default : 0.0.0.0

        • description : the host of the node

  • callback

    • description : the callback executed after connecting to mesh

    • type : function

    • required : false

mesh.listen(options, callback)

listens for incoming nodes

  • options

    • type : object

    • properties

      • port

        • type : number

        • default : 7777

        • description : the port of the node

      • host

        • type : string

        • default : 0.0.0.0

        • description : the host of the node

  • callback

    • description : the callback executed after connecting to mesh

    • type : function

    • required : false

when an incoming node connection has been made

  • options

    • type : object
  • callback

    • description : the callback executed after connecting to mesh

    • type : function

    • required : false

when an outgoing node connection has been made

  • options

    • type : object
  • callback

    • description : the callback executed after connecting to mesh

    • type : function

    • required : false

dependencies

README auto-generated with docs

npm loves you