<commit_before>= nng_aio_begin(3)
//
// Copyright 2018 Staysail Systems, Inc. <<EMAIL>>
// Copyright 2018 Capitar IT Group BV <<EMAIL>>
//
// This document is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
// file was obtained (LICENSE.txt).  A copy of the license may also be
// found online at https://opensource.org/licenses/MIT.
//

== NAME

nng_aio_begin - begin asynchronous I/O operation

== SYNOPSIS

[source, c]
----
#include <nng/nng.h>

bool nng_aio_begin(nng_aio *aio);
----

== DESCRIPTION

The `nng_aio_begin()` function is called by the I/O provider to indicate that
it is going to process the operation.

The function may return `false`, indicating that the _aio_ has been closed
by the caller asynchronously.
In this case the provider should abandon the operation and do nothing else.

This operation should be called at the start of any I/O operation, and must
be called not more than once for a given I/O operation on a given _aio_.

Once this function is called, if `true` is returned, then the provider MUST
guarantee that `<<nng_aio_finish.3#nng_aio_finish()>>` is called for the _aio_
exactly once, when the operation is complete or canceled.

NOTE: This function is only for I/O providers (those actually performing
the operation such as HTTP handler functions or transport providers); ordinary
users of the _aio_ should not call this function.

== RETURN VALUES

[horizontal]
`true`:: The operation has been started.
`false`:: The operation cannot be started.

== ERRORS

None.

== SEE ALSO

[.text-left]
<<nng_aio_alloc.3#,nng_aio_alloc(3)>>,
<<nng_aio_cancel.3#,nng_aio_cancel(3)>>,
<<nng_aio_defer.3#,nng_aio_defer(3)>>,
<<nng_aio_finish.3#,nng_aio_finish(3)>>,
<<nng_aio_result.3#,nng_aio_result(3)>>,
<<nng_aio.5#,nng_aio(5)>>,
<<nng.7#,nng(7)>>
<commit_msg>fixes #688 Dangling link in nng_aio_begin()<commit_after>= nng_aio_begin(3)
//
// Copyright 2018 Staysail Systems, Inc. <<EMAIL>>
// Copyright 2018 Capitar IT Group BV <<EMAIL>>
//
// This document is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
// file was obtained (LICENSE.txt).  A copy of the license may also be
// found online at https://opensource.org/licenses/MIT.
//

== NAME

nng_aio_begin - begin asynchronous I/O operation

== SYNOPSIS

[source, c]
----
#include <nng/nng.h>

bool nng_aio_begin(nng_aio *aio);
----

== DESCRIPTION

The `nng_aio_begin()` function is called by the I/O provider to indicate that
it is going to process the operation.

The function may return `false`, indicating that the _aio_ has been closed
by the caller asynchronously.
In this case the provider should abandon the operation and do nothing else.

This operation should be called at the start of any I/O operation, and must
be called not more than once for a given I/O operation on a given _aio_.

Once this function is called, if `true` is returned, then the provider MUST
guarantee that `<<nng_aio_finish.3#,nng_aio_finish()>>` is called for the _aio_
exactly once, when the operation is complete or canceled.

NOTE: This function is only for I/O providers (those actually performing
the operation such as HTTP handler functions or transport providers); ordinary
users of the _aio_ should not call this function.

== RETURN VALUES

[horizontal]
`true`:: The operation has been started.
`false`:: The operation cannot be started.

== ERRORS

None.

== SEE ALSO

[.text-left]
<<nng_aio_alloc.3#,nng_aio_alloc(3)>>,
<<nng_aio_cancel.3#,nng_aio_cancel(3)>>,
<<nng_aio_defer.3#,nng_aio_defer(3)>>,
<<nng_aio_finish.3#,nng_aio_finish(3)>>,
<<nng_aio_result.3#,nng_aio_result(3)>>,
<<nng_aio.5#,nng_aio(5)>>,
<<nng.7#,nng(7)>>

{'fraction_non_alphanumeric': 0.10965498796469644, 'fraction_numerical': 0.013640010698047607, 'mean_word_length': 4.582089552238806, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6485403', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1265, 'n_words': 475}