| | 1 | = Apps that do network communication = |
| | 2 | |
| | 3 | == Requesting network connection == #network |
| | 4 | |
| | 5 | If your application needs to do network communication and it appears that there is no physical network connection |
| | 6 | (e.g. `gethostbyname()` fails for a valid name) then: |
| | 7 | |
| | 8 | * Call `boinc_need_network()`. This will alert the user that a network connection is needed. |
| | 9 | * Periodically call `boinc_network_poll()` until it returns zero. |
| | 10 | * Do whatever communication is needed. |
| | 11 | * When done, call `boinc_network_done()`. This enables the hangup of a modem connection, if needed. |
| | 12 | |
| | 13 | {{{ |
| | 14 | #!c++ |
| | 15 | void boinc_need_network(); |
| | 16 | int boinc_network_poll(); |
| | 17 | void boinc_network_done(); |
| | 18 | }}} |