Top |
Core library operationsCore library operations — Methods and types to initialize and teardown the library. |
This section defines the core types and methods exposed by the RATP library.
Example 1. Initializing and tearing down the library
1 2 3 4 5 6 7 8 |
ratp_status_t st; if ((st = ratp_init ()) != RATP_STATUS_OK) { fprintf (stderr, "error: couldn't initialize RATP library: %s\n", ratp_status_str (st)); return EXIT_FAILURE; } // Use the library here |
const char *
ratp_status_str (ratp_status_t st
);
Gets a description for the given ratp_status_t.
ratp_status_t
ratp_init (void
);
Initialize the library.
If ratp_init()
fails, no further library operations may be executed, it is a
fatal error.
Status of an operation performed with the RATP library.
Operation successful. |
||
Operation failed. |
||
Not enough memory. |
||
Invalid state transition. |
||
Writing to the link failed. |
||
Reading from the link failed. |
||
Operation timed out. |
||
Invalid data. |
||
Data refused by peer. |
||
Data left unsent. |
||
Connection refused by peer. |
||
Connection reset by peer. |
||
Connection closing. |
||
Connection aborted due to user timeout. |
||
Connection aborted due to retransmission failures. |