The main structure which is used in most of the AUSS API calls is the connection struct. The connection struct contains all the information about the connection you want to make. It will be used to generate a XML header for AUSS as well.
A connection contains fields:
To initalize a connection (please don't fill in a connection yourself until this is done) the "auss_make_conn" function is used:
connection aussconn = auss_make_conn();
Once a connection object is created you can set values in it like the name.
Then one would want to connect this connection to preferrablly a connector.
to connect one simply calls:
This simply means use the aussconn object and connect to the remotehost host with the port number port, the host is a connector and send the header too.
You can do the same thing with a pipe except a pipe is unidirectional so sometimes you can send a header (e.g. STDIN).
Once connected you can read and write from the connection as you wish much like unix read and write commands.
auss_connect(&aussconn, host, port, true,true);
Data should be casted to bytes and the size is in bytes.
int readBytes = auss_read(&aussconn, data,size);
int writeBytes = auss_write(&aussconn, data,size);
Once you're done reading and writing one can simply disconnect from AUSS with:
auss_disconnect(&aussconn);