Skip to content
4am edited this page Jul 10, 2020 · 16 revisions

The inet:initIP() must be called before any other functions can be called. The ethernet driver will be dynamically loaded at this time.

Compatibility: II, ///

Usage: include "inc/inet.plh"

API:

inet:initIP()
inet:serviceIP()
inet:openUDP(localport, callback, param)
inet:sendUDP(chan, ipdst, portdst, data, len)
inet:closeUDP(chan)
inet:listenTCP(lclport, callback, param)
inet:connectTCP(remip, remport, lclport, callback, param)
inet:sendTCP(chan, data, len)
inet:closeTCP(chan)
inet:resolveIP(namestr, ipaddr)
inet:setCallback(chan, callback)
inet:setParam(chan, param)

Source Code: inet.pla, dhcp.pla, uthernet2.pla, etherip.pla, uthernet.pla

Sample Source: httpd.pla, chat.pla

Clone this wiki locally