Macaw OS C reference

Function net_status

#include <macaw.h>
int net_status(int s);

Tells you how a connection is getting on.

Parameters

sint
The connection's number.

Returns int

0 while it's connecting, 1 when it's open (or closed with some still to read), 2 once it's closed, or 3 if it went wrong.

In The network, with net_online, net_dial, net_connect, net_send, net_readline, net_read, net_receive, net_peer, net_close, net_listen, net_accept, net_port.