1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-11-08 22:06:21 +00:00
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