| 212 | | == Requesting network connection == #network |
| 213 | | |
| 214 | | If your application needs to do network communication and it appears that there is no physical network connection |
| 215 | | (e.g. `gethostbyname()` fails for a valid name) then: |
| 216 | | |
| 217 | | * Call `boinc_need_network()`. This will alert the user that a network connection is needed. |
| 218 | | * Periodically call `boinc_network_poll()` until it returns zero. |
| 219 | | * Do whatever communication is needed. |
| 220 | | * When done, call `boinc_network_done()`. This enables the hangup of a modem connection, if needed. |
| 221 | | |
| 222 | | {{{ |
| 223 | | #!c++ |
| 224 | | void boinc_need_network(); |
| 225 | | int boinc_network_poll(); |
| 226 | | void boinc_network_done(); |
| 227 | | }}} |
| | 212 | |