I have developed a small set of scripts to enable wireless access of any computercraft peripherals. These scripts are mainly for my own use, but I thought others might be interested so I posted them.

Prerequisites
You must have an operational installation and functioning network using Lyqyd's LyqydNet API.
http://www.computerc...net-rednet-api/

Programs/APIs
  • nets - network serialization API
[indent=2]This API wraps up connection.send(), connection.awaitResponse() and connection.listenIdle() to allow full client/server serialization capability.[/indent]

[indent=2]You will note that nets.send() allows multiple additional arguments. This allows the building of more complicated requests and responses. The api will also automatically return multiple results from functions calls from across the network.[/indent]

[indent=2]http://pastebin.com/4tctWiT8[/indent]

[indent=2]To Do: I need to wrap up the listen function for foreground servers. I haven't had a need for this yet, but I will get to it eventually.[/indent]
  • nperi - network peripheral API
[indent=2]This API provides for a set of functions that mimic the peripheral API, except they all include an additional argument of server prior to the existing arguments.[/indent]

[indent=2]This should work with any type of peripheral. I've tested quite a few but not all existing peripherals.[/indent]

[indent=2]http://pastebin.com/APNEz5BY[/indent]

[indent=2]To Do: I've been playing around with the connection management. In past versions I've opened and closed connections for every transaction, but that seemed wasteful. I've got a somewhat sloppy start to a connection pooling system going on now, but I'm not noticing any significant benefit in terms of network performance. More testing is definitely needed, consider this a work in progress.[/indent]
  • nperid - network peripheral server daemon
[indent=2]For nperi to work you must be running a server on the computer that the peripheral is actually attached to. This is said server. It works as a background daemon and is started with a command like: shell.run("nperid")[/indent]

[indent=2]http://pastebin.com/XhaDnyZ8[/indent]

[indent=2]To Do: Connection management related to nperi is all I'm planning here. This seems to work pretty well so far.[/indent]
  • test - nperi test program
[indent=2]This program contains a bunch of examples and tests for the system.[/indent]

[indent=2]http://pastebin.com/auun2B4E[/indent]


Other Resources
You can find more examples and my current working scripts here:
https://github.com/T...inum/Wintermute

Other Remarks
This is all a work in progress, so I am sure there are some rough parts. This is also my first Lua or ComputerCraft project so please be kind. That being said any constructive suggestions and feedback are welcomed.