Client:
rednet.open("top")
rednet.broadcast("")
id, message = rednet.receive()
websiteData = textutils.serialize(message)
website = textutils.serialize(message)
local serverData = {
[1] = (message[1])
}
term.setBackgroundColor(serverData[1])
term.clear()
Server:
os.unloadAPI("api")
rednet.open("top")
id, message = rednet.receive()
local websiteTitle = {
[1] = ("website.com"),
[2] = ("Welcome to the test website!")
}
local websiteData = {
[1] = ("colors.gray"), --background color
[2] = ("colors.blue") --text main color
}
local errorPackets = {
[1] = ("Unknown data request, disconnecting"),
[2] = ("Error proccessing data."),
[3] = ("There was 1 or 2 errors proccessing data,"),
[4] = ("so we could not send anymore data to you.")
}
function transmitPacket(data)
rednet.send(id,data)
end
function unknownDataRequest()
rednet.send(id,errorPackets)
end
transmitPacket(websiteData)
Edited by bluebird173, 18 September 2014 - 05:14 AM.












