16 Network I O
4am edited this page 2020-07-09 20:09:52 -04:00

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