Ford Module

js2p.ford.default_protocol

A Protocol() object which is used by default in the ford module

class js2p.ford.FordConnection(sock, server, outgoing)

This is the class for ford connection abstractraction. It inherits from js2p.mesh.MeshConnection()

Arguments:
  • sock – This is the raw socket object
  • server (js2p.ford.FordSocket) – This is a link to the FordSocket() parent
  • outgoing – This bool describes whether server initiated the connection
class js2p.ford.FordSocket(addr, port[, protocol[, out_addr[, debug_level]]])

This is the class for ford network socket abstraction. It inherits from js2p.mesh.MeshSocket()

Arguments:
  • addr (string) – The address you’d like to bind to
  • port (number) – The port you’d like to bind to
  • protocol (js2p.base.Protocol) – The subnet you’re looking to connect to
  • out_addr (array) – Your outward-facing address
  • debug_level (number) – The verbosity of debug prints
js2p.ford.FordSocket.js2p.ford.FordSocket.routes

A Map() which contains the path to all other nodes keyed by their IDs