Macaw OS C reference

Module The network

#include <macaw.h>

Functions

net_online
Checks whether Macaw OS is dialled in to the Macaw network.
net_dial
Asks Macaw OS to go online: Dial-Up opens and dials, unless it's online already.
net_connect
Starts a connection to a computer on the Macaw network.
net_send
Sends bytes down a connection.
net_readline
Takes one whole line that has arrived on a connection.
net_read
Takes exactly n bytes from a connection, once that many have arrived.
net_receive
Takes whatever has arrived on a connection so far, up to size bytes.
net_status
Tells you how a connection is getting on.
net_peer
Tells you who is at the other end of a connection.
net_close
Closes a connection, or stops a listener.
net_listen
Starts listening on a port, so other people on the Macaw network can connect to you at yourname.macaw.
net_accept
Takes the next person who has connected to your listener.
net_port
Tells you which port a listener is on, which you need after net_listen(0).