Copper OS

A operating system for computercraft and what goes with it.

View on GitHub

cNet (Copper Networking)

cNet is the networking library of Copper OS. It uses CryptoNet for encrypted messaging.

Clients and Servers

setup(onStart)

Setup the cNet module.

Parameters:

host(serverName, discoverable?, hideCertificate?, modemSide?, certificate?, privateKey?, userTablePath?)

Setup and host a cNet server.

Parameters:
Returns:
  1. server (Server)
    The server object.

connect(serverName?, timeout?, certTimeout?, certificate?, modemSide?, certAuthKey?, allowUnsigned?)

Open an encrypted connection to a cNet server, returning a socket object that can be used to send and receive messages from the server.

Parameters:
Returns:

send(socket, message)

Send an encrypted message over the given socket. The message can be pretty much any Lua data type.

Parameters: