Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.09 KB

File metadata and controls

60 lines (40 loc) · 1.09 KB

loopback

Summary

Local loopback network driver that feeds packets back into the bundled software network stack.

Availability

  • Repository: opencomputers
  • System: network
  • Type: library

Source

  • OpenComputers/src\main\resources\assets\opencomputers\loot\network\data\lib\network\loopback.lua

Usage

local loopback = require("network.loopback")

API

loopback.info(interface)

  • Description: Return packet and byte counters for the loopback interface.
  • Parameters:
    • interface
loopback.info(0)

loopback.send(handle, interface, destination, data)

  • Description: Deliver a packet to the loopback handler when the destination is localhost on interface lo.
  • Parameters:
    • handle
    • interface
    • destination
    • data
loopback.send(nil, 0, nil, nil)

loopback.start(eventHandler)

  • Description: Register the lo interface and its localhost host entry with the supplied event handler.
  • Parameters:
    • eventHandler
loopback.start(nil)

Notes

  • Only exported module functions are listed on this page.