Adds a + b and returns the result in *r. If the result
overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS.
Adds [num] arguments (expected to be of size_t), and returns the result in *r.
If the result overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS.
Adds a + b. If the result overflows returns SIZE_MAX.
If a + b overflows, returns AWS_OP_ERR; otherwise adds
a + b, returns the result in *r, and returns AWS_OP_SUCCESS.
Adds a + b. If the result overflows returns 2^32 - 1.
If a + b overflows, returns AWS_OP_ERR; otherwise adds
a + b, returns the result in *r, and returns AWS_OP_SUCCESS.
Adds a + b. If the result overflows returns 2^64 - 1.
Inexpensive (constant time) check of data-structure invariants.
Compare two arrays.
Return whether their contents are equivalent.
NULL may be passed as the array pointer if its length is declared to be 0.
Compare an array and a null-terminated string.
Returns true if their contents are equivalent.
The array should NOT contain a null-terminator, or the comparison will always return false.
NULL may be passed as the array pointer if its length is declared to be 0.
Perform a case-insensitive string comparison of an array and a null-terminated string.
Return whether their contents are equivalent.
The array should NOT contain a null-terminator, or the comparison will always return false.
NULL may be passed as the array pointer if its length is declared to be 0.
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
Perform a case-insensitive string comparison of two arrays.
Return whether their contents are equivalent.
NULL may be passed as the array pointer if its length is declared to be 0.
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
Copies the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.
Returns the number of elements that can fit in the internal array. If list is initialized in dynamic mode,
the capacity changes over time.
Deallocates any memory that was allocated for this list, and resets list for reuse or deletion.
Erases and then deallocates any memory that was allocated for this list, and resets list for reuse or deletion.
Clears all elements in the array and resets length to zero. Size does not change in this operation.
A convenience function for sorting lists of (const struct aws_string *) elements. This can be used as a
comparator for aws_array_list_sort. It is just a simple wrapper around aws_string_compare.
Copies the elements from from to to. If to is in static mode, it must at least be the same length as from. Any data
in to will be overwritten in this copy.
Ensures that the array list has enough capacity to store a value at the specified index. If there is not already
enough capacity, and the list is in dynamic mode, this function will attempt to allocate more memory, expanding the
list. In static mode, if ‘index’ is beyond the maximum index, AWS_ERROR_INVALID_INDEX will be raised.
Deletes the element this index in the list if it exists.
If element does not exist, AWS_ERROR_INVALID_INDEX will be raised.
This call results in shifting all remaining elements towards the front.
Avoid this call unless that is intended behavior.
Copies the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised
Copies the memory at index to val. If element does not exist, AWS_ERROR_INVALID_INDEX will be raised.
Copies the memory address of the element at index to *val. If element does not exist, AWS_ERROR_INVALID_INDEX will be
raised.
Initializes an array list with an array of size initial_item_allocation * item_size. In this mode, the array size
will grow by a factor of 2 upon insertion if space is not available. initial_item_allocation is the number of
elements you want space allocated for. item_size is the size of each element in bytes. Mixing items types is not
supported by this API.
Initializes an array list with a preallocated array of void *. item_count is the number of elements in the array,
and item_size is the size in bytes of each element. Mixing items types is not supported
by this API. Once this list is full, new items will be rejected.
Initializes an array list with a preallocated array of already-initialized elements. item_count is the number of
elements in the array, and item_size is the size in bytes of each element.
Set of properties of a valid aws_array_list.
Returns the number of elements in the internal array.
Deletes the element at the end of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.
Deletes the element at the front of the list if it exists. If list is empty, AWS_ERROR_LIST_EMPTY will be raised.
This call results in shifting all of the elements at the end of the array to the front. Avoid this call unless that
is intended behavior.
Delete N elements from the front of the list.
Remaining elements are shifted to the front of the list.
If the list has less than N elements, the list is cleared.
This call is more efficient than calling aws_array_list_pop_front() N times.
Pushes the memory pointed to by val onto the end of internal list
Pushes the memory pointed to by val onto the front of internal list.
This call results in shifting all of the elements in the list. Avoid this call unless that
is intended behavior.
Copies the the memory pointed to by val into the array at index. If in dynamic mode, the size will grow by a factor
of two when the array is full. In static mode, AWS_ERROR_INVALID_INDEX will be raised if the index is past the bounds
of the array.
If in dynamic mode, shrinks the allocated array size to the minimum amount necessary to store its elements.
Sort elements in the list in-place according to the comparator function.
Swap elements at the specified indices, which must be within the bounds of the array.
Swap contents between two dynamic lists. Both lists must use the same allocator.
Increment reference count.
You may pass in NULL (has no effect).
Returns whatever pointer was passed in.
Initialize aws_async_input_stream “base class”
Read once from the async stream into the buffer.
The read completes when at least 1 byte is read, the buffer is full, or EOF is reached.
Depending on implementation, the read could complete at any time.
It may complete synchronously. It may complete on another thread.
Returns a future, which will contain an error code if something went wrong,
or a result bool indicating whether EOF has been reached.
Read repeatedly from the async stream until the buffer is full, or EOF is reached.
Depending on implementation, this could complete at any time.
It may complete synchronously. It may complete on another thread.
Returns a future, which will contain an error code if something went wrong,
or a result bool indicating whether EOF has been reached.
Decrement reference count.
You may pass in NULL (has no effect).
Always returns NULL.
Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set
to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.
Returns true if the compare was successful and the variable updated to desired.
Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set
to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.
order_failure must be no stronger than order_success, and must not be release or acq_rel.
Returns true if the compare was successful and the variable updated to desired.
Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set
to the value in *var. Uses sequentially consistent memory ordering, regardless of success or failure.
Returns true if the compare was successful and the variable updated to desired.
Atomically compares *var to *expected; if they are equal, atomically sets *var = desired. Otherwise, *expected is set
to the value in *var. On success, the memory ordering used was order_success; otherwise, it was order_failure.
order_failure must be no stronger than order_success, and must not be release or acq_rel.
Returns true if the compare was successful and the variable updated to desired.
Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.
Returns the value that was previously in the atomic_var.
Exchanges an integer with the value in an atomic_var, using the specified ordering.
Returns the value that was previously in the atomic_var.
Exchanges an integer with the value in an atomic_var, using sequentially consistent ordering.
Returns the value that was previously in the atomic_var.
Exchanges a pointer with the value in an atomic_var, using the specified ordering.
Returns the value that was previously in the atomic_var.
Atomically adds n to *var, and returns the previous value of *var.
Uses sequentially consistent ordering.
Atomically adds n to *var, and returns the previous value of *var.
Atomically ands n into *var, and returns the previous value of *var.
Uses sequentially consistent ordering.
Atomically ANDs n with *var, and returns the previous value of *var.
Atomically ors n into *var, and returns the previous value of *var.
Uses sequentially consistent ordering.
Atomically ORs n with *var, and returns the previous value of *var.
Atomically subtracts n from *var, and returns the previous value of *var.
Uses sequentially consistent ordering.
Atomically subtracts n from *var, and returns the previous value of *var.
Atomically xors n into *var, and returns the previous value of *var.
Uses sequentially consistent ordering.
Atomically XORs n with *var, and returns the previous value of *var.
Initializes an atomic variable with an integer value. This operation should be done before any
other operations on this atomic variable, and must be done before attempting any parallel operations.
Initializes an atomic variable with a pointer value. This operation should be done before any
other operations on this atomic variable, and must be done before attempting any parallel operations.
Reads an atomic var as an integer, using sequentially consistent ordering, and returns the result.
Reads an atomic var as an integer, using the specified ordering, and returns the result.
Reads an atomic var as a pointer, using sequentially consistent ordering, and returns the result.
Reads an atomic var as a pointer, using the specified ordering, and returns the result.
Stores an integer into an atomic var, using sequentially consistent ordering.
Stores an integer into an atomic var, using the specified ordering.
Stores a pointer into an atomic var, using sequentially consistent ordering.
Stores a pointer into an atomic var, using the specified ordering.
Provides the same reordering guarantees as an atomic operation with the specified memory order, without
needing to actually perform an atomic operation.
Clean up internal datastructures used by aws-c-auth.
Must not be called until application is done using functionality in aws-c-auth.
Initializes internal datastructures used by aws-c-auth.
Must be called before using any functionality in aws-c-auth.
Appends a sub-buffer to the specified buffer.
Copies from to to. If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be
returned. dest->len will contain the amount of data actually copied to dest.
Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer.
If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned.
Copies a single byte into to
. If to
is too small, the buffer will be grown appropriately and
the old contents copied over, before the byte is appended.
Copies a single byte into to
. If to
is too small, the buffer will be grown appropriately and
the old contents copied over, before the byte is appended.
Writes the uri decoding of a UTF-8 cursor to a buffer,
replacing %xx escapes by their single byte equivalent.
For example, reading “a%20b_c” would write “a b_c”.
Copies from to to. If to is too small, the buffer will be grown appropriately and
the old contents copied to, before the new contents are appended.
Copies from
to to
. If to
is too small, the buffer will be grown appropriately and
the old contents copied over, before the new contents are appended.
Writes the uri query param encoding (passthrough alnum + ‘-’ ‘_’ ‘~’ ‘.’) of a UTF-8 cursor to a buffer
For example, reading “a b_c” would write “a%20b_c”.
Writes the uri path encoding of a cursor to a buffer. This is the modified version of rfc3986 used by
sigv4 signing.
Appends ‘\0’ at the end of the buffer.
Copies from to to while converting bytes via the passed in lookup table.
If to is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be
returned. to->len will contain its original size plus the amount of data actually copied to to.
Concatenates a variable number of struct aws_byte_buf * into destination.
Number of args must be greater than 1. If dest is too small,
AWS_ERROR_DEST_COPY_TOO_SMALL will be returned. dest->len will contain the
amount of data actually copied to dest.
Equivalent to calling aws_byte_buf_secure_zero and then aws_byte_buf_clean_up
on the buffer.
Compare two aws_byte_buf structures.
Return whether their contents are equivalent.
Compare an aws_byte_buf and a null-terminated string.
Returns true if their contents are equivalent.
The buffer should NOT contain a null-terminator, or the comparison will always return false.
Perform a case-insensitive string comparison of an aws_byte_buf and a null-terminated string.
Return whether their contents are equivalent.
The buffer should NOT contain a null-terminator, or the comparison will always return false.
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
Perform a case-insensitive string comparison of two aws_byte_buf structures.
Return whether their contents are equivalent.
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
For creating a byte buffer from a null-terminated string literal.
Init buffer with contents of multiple cursors, and update cursors to reference the memory stored in the buffer.
Each cursor arg must be an struct aws_byte_cursor *
. NULL must be passed as the final arg.
NOTE: Do not append/grow/resize buffers initialized this way, or the cursors will end up referencing invalid memory.
Returns AWS_OP_SUCCESS in case of success.
AWS_OP_ERR is returned if memory can’t be allocated or the total cursor length exceeds SIZE_MAX.
Initializes an aws_byte_buf structure base on another valid one.
Requires: *src and *allocator are valid objects.
Ensures: *dest is a valid aws_byte_buf with a new backing array dest->buffer
which is a copy of the elements from src->buffer.
Copies src buffer into dest and sets the correct len and capacity.
A new memory zone is allocated for dest->buffer. When dest is no longer needed it will have to be cleaned-up using
aws_byte_buf_clean_up(dest).
Dest capacity and len will be equal to the src len. Allocator of the dest will be identical with parameter allocator.
If src buffer is null the dest will have a null buffer with a len and a capacity of 0
Returns AWS_OP_SUCCESS in case of success or AWS_OP_ERR when memory can’t be allocated.
Reads ‘filename’ into ‘out_buf’. If successful, ‘out_buf’ is allocated and filled with the data;
It is your responsibility to call ‘aws_byte_buf_clean_up()’ on it. Otherwise, ‘out_buf’ remains
unused. In the very unfortunate case where some API needs to treat out_buf as a c_string, a null terminator
is appended, but is not included as part of the length field.
Same as aws_byte_buf_init_from_file(), but for reading “special files” like /proc/cpuinfo.
These files don’t accurately report their size, so size_hint is used as initial buffer size,
and the buffer grows until the while file is read.
Evaluates the set of properties that define the shape of all valid aws_byte_buf structures.
It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion).
Attempts to increase the capacity of a buffer to the requested capacity
Convenience function that attempts to increase the capacity of a buffer relative to the current
length.
Resets the len of the buffer to 0, but does not free the memory. The buffer can then be reused.
Optionally zeroes the contents, if the “zero_contents” flag is true.
Sets all bytes of buffer to zero and resets len to zero.
Write specified number of bytes from array to byte buffer.
Writes a 16-bit integer in network byte order (big endian) to buffer.
Writes low 24-bits (3 bytes) of an unsigned integer in network byte order (big endian) to buffer.
Ex: If x is 0x00AABBCC then {0xAA, 0xBB, 0xCC} is written to buffer.
Writes a 32-bit integer in network byte order (big endian) to buffer.
Writes a 64-bit integer in network byte order (big endian) to buffer.
Writes a 32-bit float in network byte order (big endian) to buffer.
Writes a 64-bit float in network byte order (big endian) to buffer.
Copies all bytes from buffer to buffer.
Copies all bytes from buffer to buffer.
Copies all bytes from string to buf.
Without increasing buf’s capacity, write as much as possible from advancing_cursor into buf.
Copies one byte to buffer.
Writes one byte repeatedly to buffer (like memset)
Tests if the given aws_byte_cursor has at least len bytes remaining. If so,
*buf is advanced by len bytes (incrementing ->ptr and decrementing ->len),
and an aws_byte_cursor referring to the first len bytes of the original *buf
is returned. Otherwise, an aws_byte_cursor with ->ptr = NULL, ->len = 0 is
returned.
Behaves identically to aws_byte_cursor_advance, but avoids speculative
execution potentially reading out-of-bounds pointers (by returning an
empty ptr in such speculated paths).
Lexical (byte value) comparison of two byte cursors
Lexical (byte value) comparison of two byte cursors where the raw values are sent through a lookup table first
Compare two aws_byte_cursor structures.
Return whether their contents are equivalent.
Compare an aws_byte_cursor and an aws_byte_buf.
Return whether their contents are equivalent.
Perform a case-insensitive string comparison of an aws_byte_cursor and an aws_byte_buf.
Return whether their contents are equivalent.
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
Compare an aws_byte_cursor and a null-terminated string.
Returns true if their contents are equivalent.
The cursor should NOT contain a null-terminator, or the comparison will always return false.
Perform a case-insensitive string comparison of an aws_byte_cursor and a null-terminated string.
Return whether their contents are equivalent.
The cursor should NOT contain a null-terminator, or the comparison will always return false.
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
Perform a case-insensitive string comparison of two aws_byte_cursor structures.
Return whether their contents are equivalent.
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
Search for an exact byte match inside a cursor. The first match will be returned. Returns AWS_OP_SUCCESS
on successful match and first_find will be set to the offset in input_str, and length will be the remaining length
from input_str past the returned offset. If the match was not found, AWS_OP_ERR will be returned and
AWS_ERROR_STRING_MATCH_NOT_FOUND will be raised.
Creates an aws_byte_cursor from an existing string.
Evaluates the set of properties that define the shape of all valid aws_byte_cursor structures.
It is also a cheap check, in the sense it runs in constant time (i.e., no loops or recursion).
Shrinks a byte cursor from the left for as long as the supplied predicate is true
No copies, no buffer allocations. Iterates over input_str, and returns the
next substring between split_on instances relative to previous substr.
Behaves similar to strtok with substr being used as state for next split.
Reads specified length of data from byte cursor and copies it to the
destination array.
Reads as many bytes from cursor as size of buffer, and copies them to buffer.
Reads a 16-bit value in network byte order from cur, and places it in host
byte order into var.
Reads an unsigned 24-bit value (3 bytes) in network byte order from cur,
and places it in host byte order into 32-bit var.
Ex: if cur’s next 3 bytes are {0xAA, 0xBB, 0xCC}, then var becomes 0x00AABBCC.
Reads a 32-bit value in network byte order from cur, and places it in host
byte order into var.
Reads a 64-bit value in network byte order from cur, and places it in host
byte order into var.
Reads a 32-bit value in network byte order from cur, and places it in host
byte order into var.
Reads a 64-bit value in network byte order from cur, and places it in host
byte order into var.
Reads 2 hex characters from ASCII/UTF-8 text to produce an 8-bit number.
Accepts both lowercase ‘a’-‘f’ and uppercase ‘A’-‘F’.
For example: “0F” produces 15.
Reads a single byte from cursor, placing it in *var.
Shrinks a byte cursor from the right for as long as the supplied predicate is true
Returns true if the byte cursor’s range of bytes all satisfy the predicate
No copies, no buffer allocations. Fills in output with a list of
aws_byte_cursor instances where buffer is an offset into the input_str and
len is the length of that string in the original buffer.
No copies, no buffer allocations. Fills in output with a list of aws_byte_cursor instances where buffer is
an offset into the input_str and len is the length of that string in the original buffer. N is the max number of
splits, if this value is zero, it will add all splits to the output.
Return true if the input starts with the prefix (exact byte comparison).
Return true if the input starts with the prefix (case-insensitive).
The “C” locale is used for comparing upper and lowercase letters.
Data is assumed to be ASCII text, UTF-8 will work fine too.
Shrinks a byte cursor from both sides for as long as the supplied predicate is true
Read entire cursor as ASCII/UTF-8 unsigned base-10 number.
Stricter than strtoull(), which allows whitespace and inputs that start with “0x”
Read entire cursor as ASCII/UTF-8 unsigned base-16 number with NO “0x” prefix.
Best-effort checks aws_string invariants, when the str->len is unknown
Prevent a channel’s memory from being freed.
Any number of users may acquire a hold to prevent a channel and its handlers from being unexpectedly freed.
Any user which acquires a hold must release it via aws_channel_release_hold().
Memory will be freed once all holds are released and aws_channel_destroy() has been called.
Acquires a message from the event loop’s message pool. size_hint is merely a hint, it may be smaller than you
requested and you are responsible for checking the bounds of it. If the returned message is not large enough, you
must send multiple messages.
Fetches the current timestamp from the event-loop’s clock, in nanoseconds.
Mark the channel, along with all slots and handlers, for destruction.
Must be called after shutdown has completed.
Can be called from any thread assuming ‘aws_channel_shutdown()’ has completed.
Note that memory will not be freed until all users which acquired holds on the channel via
aws_channel_acquire_hold(), release them via aws_channel_release_hold().
Retrieves an object by key from the event loop’s local storage.
Fetches the event loop the channel is a part of.
Calls destroy on handler’s vtable
Calls on_window_update on handler’s vtable.
Calls initial_window_size on handler’s vtable.
Calls process_read_message on handler’s vtable
Calls process_write_message on handler’s vtable.
calls shutdown_direction on handler’s vtable.
Allocates new channel, Unless otherwise specified all functions for channels and channel slots must be executed
within that channel’s event-loop’s thread. channel_options are copied.
Stores an object by key in the event loop’s local storage.
Release a hold on the channel’s memory, allowing it to be freed.
This may be called before or after aws_channel_destroy().
Removes an object by key from the event loop’s local storage.
Schedules a task to run on the event loop at the specified time.
This is the ideal way to move a task into the correct thread. It’s also handy for context switches.
Use aws_channel_current_clock_time() to get the current time in nanoseconds.
This function is safe to call from any thread.
Schedules a task to run on the event loop as soon as possible.
This is the ideal way to move a task into the correct thread. It’s also handy for context switches.
This function is safe to call from any thread.
Schedules a task to run on the event loop as soon as possible.
Instrument a channel with a statistics handler. While instrumented with a statistics handler, the channel
will periodically report per-channel-handler-specific statistics about handler performance and state.
Initiates shutdown of the channel. Shutdown will begin with the left-most slot. Each handler will invoke
‘aws_channel_slot_on_handler_shutdown_complete’ once they’ve finished their shutdown process for the read direction.
Once the right-most slot has shutdown in the read direction, the process will start shutting down starting on the
right-most slot. Once the left-most slot has shutdown in the write direction, ‘callbacks->shutdown_completed’ will be
invoked in the event loop’s thread.
Convenience function that invokes aws_channel_acquire_message_from_pool(),
asking for the largest reasonable DATA message that can be sent in the write direction,
with upstream overhead accounted for.
Fetches the downstream read window. This gives you the information necessary to honor the read window. If you call
send_message() and it exceeds this window, the message will be rejected.
Issues a window update notification upstream (to the left.)
Inserts to ‘to_add’ the end of the channel. Note that the first call to
aws_channel_slot_new() adds it to the channel implicitly.
inserts ‘to_add’ to the position immediately to the left of slot. Note that the first call to
aws_channel_slot_new() adds it to the channel implicitly.
inserts ‘to_add’ to the position immediately to the right of slot. Note that the first call to
aws_channel_slot_new() adds it to the channel implicitly.
Allocates and initializes a new slot for use with the channel. If this is the first slot in the channel, it will
automatically be added to the channel as the first slot. For all subsequent calls on a given channel, the slot will
need to be added to the channel via. the aws_channel_slot_insert_right(), aws_channel_slot_insert_end(), and
aws_channel_slot_insert_left() APIs.
Called by handlers once they have finished their shutdown in the ‘dir’ direction. Propagates the shutdown process
to the next handler in the channel.
Removes slot from the channel and deallocates the slot and its handler.
Replaces remove with new_slot. Deallocates remove and its handler.
Sends a message to the adjacent slot in the channel based on dir. Also does window size checking.
Sets the handler for a slot, the slot will also call get_current_window_size() and propagate a window update
upstream.
Initiates shutdown on slot. callbacks->on_shutdown_completed will be called
once the shutdown process is completed.
Fetches the current overhead of upstream handlers. This provides a hint to avoid fragmentation if you care.
Initializes channel_task for use.
Returns true if the caller is on the event loop’s thread. If false, you likely need to use
aws_channel_schedule_task(). This function is safe to call from any thread.
A way for external processes to force a read by the data-source channel handler. Necessary in certain cases, like
when a server channel finishes setting up its initial handlers, a read may have already been triggered on the
socket (the client’s CLIENT_HELLO tls payload, for example) and absent further data/notifications, this data
would never get processed.
Evaluates if a char is a white character.
The entry point function to perform a CRC32 (Ethernet, gzip) computation.
Selects a suitable implementation based on hardware capabilities.
Pass 0 in the previousCrc32 parameter as an initial value unless continuing
to update a running crc in a subsequent call.
The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.
Selects a suitable implementation based on hardware capabilities.
Pass 0 in the previousCrc32 parameter as an initial value unless continuing
to update a running crc in a subsequent call.
Increments a client bootstrap’s ref count, allowing the caller to take a reference to it.
Create the client bootstrap.
Sets up a client socket channel.
Decrements a client bootstrap’s ref count. When the ref count drops to zero, the bootstrap will be destroyed.
When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added
to the channel.
Counts the number of leading 0 bits in an integer. 0 will return the size of the integer in bits.
Shuts down the internal data structures used by aws-c-common.
Initializes internal data structures used by aws-c-common.
Must be called before using any functionality in aws-c-common.
Add a reference to some credentials
Get the AWS access key id from a set of credentials
Get the elliptic curve key associated with this set of credentials
@param credentials credentials to get the the elliptic curve key for
@return the elliptic curve key associated with the credentials, or NULL if no key is associated with
these credentials
Get the expiration timepoint (in seconds since epoch) associated with a set of credentials
Get the AWS secret access key from a set of credentials
Get the AWS session token from a set of credentials
If credentials are anonymous, then the signing process is skipped.
Creates a new set of aws credentials
Creates a new set of aws anonymous credentials.
Use Anonymous credentials, when you want to skip the signing process.
Creates a set of AWS credentials that includes an ECC key pair. These credentials do not have a value for
the secret access key; the ecc key takes over that field’s role in sigv4a signing.
Creates a new set of AWS credentials
Creates a simple anonymous credentials provider
Creates a provider that functions as a caching decorating of another provider.
Creates a provider that sources credentials from an ordered sequence of providers, with the overall result
being from the first provider to return a valid set of credentials
Creates the default provider chain used by most AWS SDKs.
Creates a provider that sources credentials from the Cognito-Identity service via an
invocation of the GetCredentialsForIdentity API call.
Creates a cognito-based provider that has a caching layer wrapped around it
Create a credentials provider depends on provided vtable to fetch the credentials.
Creates a provider that sources credentials from the ecs role credentials service
Creates a provider that returns credentials sourced from the environment variables:
Creates a provider that sources credentials from the ec2 instance metadata service
Creates a provider that sources credentials from key-value profiles loaded from the aws credentials
file (“/.aws/credentials” by default) and the aws config file (“/.aws/config” by
default)
Creates a provider that sources credentials from SSO using a SSOToken.
Creates a simple provider that just returns a fixed set of credentials
Creates a provider that assumes an IAM role via. STS AssumeRole() API. This provider will fetch new credentials
upon each call to aws_credentials_provider_get_credentials().
Creates a provider that sources credentials from STS using AssumeRoleWithWebIdentity
Creates a provider that sources credentials from IoT Core
Release a reference to a credentials provider
Remove a reference to some credentials
completely destroys a statistics handler. The handler’s cleanup function must clean up the impl portion completely
(including its allocation, if done separately).
Queries the frequency (via an interval in milliseconds) which a statistics handler would like to be informed
of statistics.
Submits a list of statistics objects to a statistics handler for processing
Counts the number of trailing 0 bits in an integer. 0 will return the size of the integer in bits.
returns the difference of a and b (a - b) in seconds.
Initializes dt to be the time represented in milliseconds since unix epoch.
Initializes dt to be the time represented in seconds.millis since unix epoch.
Initializes dt to be the time represented by date_str in format ‘fmt’. Returns AWS_OP_SUCCESS if the
string was successfully parsed, returns AWS_OP_ERR if parsing failed.
aws_date_time_init variant that takes a byte_cursor rather than a byte_buf
Initializes dt to be the current system time.
Copies the current time as a formatted short date string in local time into output_buf. If buffer is too small, it
will return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not
allowed.
Copies the current time as a formatted date string in local time into output_buf. If buffer is too small, it will
return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not
allowed.
Copies the current time as a formatted short date string in utc time into output_buf. If buffer is too small, it will
return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not
allowed.
Copies the current time as a formatted date string in utc time into output_buf. If buffer is too small, it will
return AWS_OP_ERR. A good size suggestion is AWS_DATE_TIME_STR_MAX_LEN bytes. AWS_DATE_FORMAT_AUTO_DETECT is not
allowed.
WARNING! do not call this function directly (getaddrinfo()): it blocks. Provide a pointer to this function for other
resolution functions.
Returns an instance of system default thread options.
Derives an ecc key pair (based on the nist P256 curve) from the access key id and secret access key components
of a set of AWS credentials using an internal key derivation specification. Used to perform sigv4a signing in
the hybrid mode based on AWS credentials.
Create new rule engine for a given ruleset.
In cases of failure NULL is returned and last error is set.
Cancels task.
This function must be called from the event loop’s thread, and is only guaranteed
to work properly on tasks scheduled from within the event loop’s thread.
The task will be executed with the AWS_TASK_STATUS_CANCELED status inside this call.
Common cleanup code for all implementations.
This is only called from the *destroy() function of event loop implementations.
Gets the current timestamp for the event loop’s clock, in nanoseconds. This function is thread-safe.
Invokes the destroy() fn for the event loop implementation.
If the event loop is still in a running state, this function will block waiting on the event loop to shutdown.
If you do not want this function to block, call aws_event_loop_stop() manually first.
If the event loop is shared by multiple threads then destroy must be called by exactly one thread. All other threads
must ensure their API calls to the event loop happen-before the call to destroy.
Fetches an object from the event-loop’s data store. Key will be taken as the memory address of the memory pointed to
by key. This function is not thread safe and should be called inside the event-loop’s thread.
Cleans up resources (user_data) associated with the I/O eventing subsystem for a given handle. This should only
ever be necessary in the case where you are cleaning up an event loop during shutdown and its thread has already
been joined.
Returns the current load factor (however that may be calculated). If the event-loop is not invoking
aws_event_loop_register_tick_start() and aws_event_loop_register_tick_end(), this value will always be 0.
Increments the reference count on the event loop group, allowing the caller to take a reference to it.
Fetches the next loop for use. The purpose is to enable load balancing across loops. You should not depend on how
this load balancing is done as it is subject to change in the future. Currently it uses the “best-of-two” algorithm
based on the load factor of each loop.
Creates an event loop group, with clock, number of loops to manage, and the function to call for creating a new
event loop.
Initializes an event loop group with platform defaults. If max_threads == 0, then the
loop count will be the number of available processors on the machine / 2 (to exclude hyper-threads).
Otherwise, max_threads will be the number of event loops in the group.
Creates an event loop group, with clock, number of loops to manage, the function to call for creating a new
event loop, and also pins all loops to hw threads on the same cpu_group (e.g. NUMA nodes). Note:
If el_count exceeds the number of hw threads in the cpu_group it will be clamped to the number of hw threads
on the assumption that if you care about NUMA, you don’t want hyper-threads doing your IO and you especially
don’t want IO on a different node.
Creates an event loop group, with clock, number of loops to manage, the function to call for creating a new
event loop, and also pins all loops to hw threads on the same cpu_group (e.g. NUMA nodes). Note:
If el_count exceeds the number of hw threads in the cpu_group it will be ignored on the assumption that if you
care about NUMA, you don’t want hyper-threads doing your IO and you especially don’t want IO on a different node.
Decrements an event loop group’s ref count. When the ref count drops to zero, the event loop group will be
destroyed.
Initializes common event-loop data structures.
This is only called from the *new() function of event loop implementations.
Creates an instance of the default event loop implementation for the current architecture and operating system.
Creates an instance of the default event loop implementation for the current architecture and operating system using
extendable options.
Puts an item object the event-loop’s data store. Key will be taken as the memory address of the memory pointed to by
key. The lifetime of item must live until remove or a put item overrides it. This function is not thread safe and
should be called inside the event-loop’s thread.
For event-loop implementations to use for providing metrics info to the base event-loop. This enables the
event-loop load balancer to take into account load when vending another event-loop to a caller.
For event-loop implementations to use for providing metrics info to the base event-loop. This enables the
event-loop load balancer to take into account load when vending another event-loop to a caller.
Removes an object from the event-loop’s data store. Key will be taken as the memory address of the memory pointed to
by key. If removed_item is not null, the removed item will be moved to it if it exists. Otherwise, the default
deallocation strategy will be used. This function is not thread safe and should be called inside the event-loop’s
thread.
Triggers the running of the event loop. This function must not block. The event loop is not active until this
function is invoked. This function can be called again on an event loop after calling aws_event_loop_stop() and
aws_event_loop_wait_for_stop_completion().
The event loop will schedule the task and run it at the specified time.
Use aws_event_loop_current_clock_time() to query the current time in nanoseconds.
Note that cancelled tasks may execute outside the event loop thread.
This function may be called from outside or inside the event loop thread.
The event loop will schedule the task and run it on the event loop thread as soon as possible.
Note that cancelled tasks may execute outside the event loop thread.
This function may be called from outside or inside the event loop thread.
Triggers the event loop to stop, but does not wait for the loop to stop completely.
This function may be called from outside or inside the event loop thread. It is safe to call multiple times.
This function is called from destroy().
Subscribes on_event to events on the event-loop for handle. events is a bitwise concatenation of the events that were
received. The definition for these values can be found in aws_io_event_type. Currently, only
AWS_IO_EVENT_TYPE_READABLE and AWS_IO_EVENT_TYPE_WRITABLE are honored. You always are registered for error conditions
and closure. This function may be called from outside or inside the event loop thread. However, the unsubscribe
function must be called inside the event-loop’s thread.
Returns true if the event loop’s thread is the same thread that called this function, otherwise false.
Unsubscribes handle from event-loop notifications.
This function is not thread safe and should be called inside the event-loop’s thread.
Blocks until the event loop stops completely.
If you want to call aws_event_loop_run() again, you must call this after aws_event_loop_stop().
It is not safe to call this function from inside the event loop thread.
aws_future
Case-insensitive hash function for array containing ASCII or UTF-8 text.
Convenience hash function for struct aws_byte_cursor.
Hash is same as used on the string bytes by aws_hash_c_string.
Case-insensitive hash function for aws_byte_cursors stored in an aws_hash_table.
For case-sensitive hashing, use aws_hash_byte_cursor_ptr().
Convenience hash function for NULL-terminated C-strings
Convenience eq callback for NULL-terminated C-strings
Convenience destroy callback for AWS strings
Convenience eq callback for AWS strings
Returns an iterator to be used for iterating through a hash table.
Iterator will already point to the first element of the table it finds,
which can be accessed as iter.element.
Deletes the element currently pointed-to by the hash iterator.
After calling this method, the element member of the iterator
should not be accessed until the next call to aws_hash_iter_next.
Returns true if iterator is done iterating through table, false otherwise.
If this is true, the iterator will not include an element of the table.
Given a pointer to a hash_iter, checks that it is well-formed, with all data-structure invariants.
Updates iterator so that it points to next element of hash table.
Convenience hash function which hashes the pointer value directly,
without dereferencing. This can be used in cases where pointer identity
is desired, or where a uintptr_t is encoded into a const void *.
Convenience hash function for struct aws_strings.
Hash is same as used on the string bytes by aws_hash_c_string.
Deletes every element from map and frees all associated memory.
destroy_fn will be called for each element. aws_hash_table_init
must be called before reusing the hash table.
Removes every element from the hash map. destroy_fn will be called for
each element.
Attempts to locate an element at key. If no such element was found,
creates a new element, with value initialized to NULL. In either case, a
pointer to the element is placed in *p_elem.
Compares two hash tables for equality. Both hash tables must have equivalent
key comparators; values will be compared using the comparator passed into this
function. The key hash function does not need to be equivalent between the
two hash tables.
Attempts to locate an element at key. If the element is found, a
pointer to the value is placed in *p_elem; if it is not found,
*pElem is set to NULL. Either way, AWS_OP_SUCCESS is returned.
Iterates through every element in the map and invokes the callback on
that item. Iteration is performed in an arbitrary, implementation-defined
order, and is not guaranteed to be consistent across invocations.
Returns the current number of entries in the table.
Initializes a hash map with initial capacity for ‘size’ elements
without resizing. Uses hash_fn to compute the hash of each element.
equals_fn to compute equality of two keys. Whenever an element is
removed without being returned, destroy_key_fn is run on the pointer
to the key and destroy_value_fn is run on the pointer to the value.
Either or both may be NULL if a callback is not desired in this case.
Best-effort check of hash_table_state data-structure invariants
Moves the hash table in ‘from’ to ‘to’. After this move, ‘from’ will
be identical to the state of the original ‘to’ hash table, and ‘to’
will be in the same state as if it had been passed to aws_hash_table_clean_up
(that is, it will have no memory allocated, and it will be safe to
either discard it or call aws_hash_table_clean_up again).
Inserts a new element at key, with the given value. If another element
exists at that key, the old element will be overwritten; both old key and
value objects will be destroyed.
Removes element at key. Always returns AWS_OP_SUCCESS.
Removes element already known (typically by find()).
Safely swaps two hash tables. Note that we swap the entirety of the hash
table, including which allocator is associated.
Cleans up the memory for address
Copies from
to to
.
Moves from
to to
. After this call, from is no longer usable. Though, it could be resused for another
move or copy operation.
Increments the reference count on the host resolver, allowing the caller to take a reference to it.
get number of addresses for a given host.
Returns the default host resolution config used internally if none specified.
Creates a host resolver with the default behavior. Here’s the behavior:
@Deprecated Use purge_cache_with_callback instead
calls purge_cache on the vtable.
Calls aws_host_resolver_purge_cache_with_callback on the vtable which will wipe out everything host resolver has
cached.
Removes the cache for a host asynchronously.
calls record_connection_failure on the vtable.
Decrements a host resolver’s ref count. When the ref count drops to zero, the resolver will be destroyed.
calls resolve_host on the vtable. config will be copied.
Convert 16 bit integer from host to network byte order.
Convert 32 bit integer from host to network byte order.
Convert 64 bit integer from host to network byte order.
Convert 32 bit float from host to network byte order.
Convert 64 bit double from host to network byte order.
Add a list of headers to be added as trailing headers sent after the last chunk is sent.
a “Trailer” header field which indicates the fields present in the trailer.
Submit a chunk of data to be sent on an HTTP/1.1 stream.
The stream must have specified “chunked” in a “transfer-encoding” header.
For client streams, activate() must be called before any chunks are submitted.
For server streams, the response must be submitted before any chunks.
A final chunk with size 0 must be submitted to successfully complete the HTTP-stream.
Send a SETTINGS frame (HTTP/2 only).
SETTINGS will be applied locally when SETTINGS ACK is received from peer.
Get the local settings we are using to affect the decoding.
Get data about the latest GOAWAY frame received from peer (HTTP/2 only).
If no GOAWAY has been received, or the GOAWAY payload is still in transmitting,
AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.
Get the settings received from remote peer, which we are using to restricts the message to send.
Get data about the latest GOAWAY frame sent to peer (HTTP/2 only).
If no GOAWAY has been sent, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE will be raised.
Note that GOAWAY frames are typically sent automatically by the connection
during shutdown.
Send a PING frame (HTTP/2 only).
Round-trip-time is calculated when PING ACK is received from peer.
Send a custom GOAWAY frame (HTTP/2 only).
Increment the connection’s flow-control window to keep data flowing (HTTP/2 only).
Get the :method
value (HTTP/2 headers only).
Get :status
(response pseudo headers only).
If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised.
Set :authority
(request pseudo headers only).
The pseudo headers makes its own copy of the underlying string.
Set :method
(HTTP/2 headers only).
The headers makes its own copy of the underlying string.
Set :path
(request pseudo headers only).
The pseudo headers makes its own copy of the underlying string.
Set :scheme
(request pseudo headers only).
The pseudo headers makes its own copy of the underlying string.
Set :status
(response pseudo headers only).
Create an HTTP/2 message from HTTP/1.1 message.
pseudo headers will be created from the context and added to the headers of new message.
Normal headers will be copied to the headers of new message.
Note:
Create a new HTTP/2 request message.
pseudo headers need to be set from aws_http2_headers_set_request_* to the headers of the aws_http_message.
Will be errored out if used in HTTP/1.1 connection.
Create a new HTTP/2 response message.
pseudo headers need to be set from aws_http2_headers_set_response_status to the headers of the aws_http_message.
Will be errored out if used in HTTP/1.1 connection.
Get the error code received in rst_stream.
Only valid if the stream has completed, and an RST_STREAM frame has received.
Get the HTTP/2 error code sent in the RST_STREAM frame (HTTP/2 only).
Only valid if the stream has completed, and has sent an RST_STREAM frame.
Reset the HTTP/2 stream (HTTP/2 only).
Note that if the stream closes before this async call is fully processed, the RST_STREAM frame will not be sent.
The stream must have specified http2_use_manual_data_writes
during request creation.
For client streams, activate() must be called before any frames are submitted.
For server streams, the response headers must be submitted before any frames.
A write with options that has end_stream set to be true will end the stream and prevent any further write.
Initialize an empty hash-table that maps struct aws_string *
to enum aws_http_version
.
This map can used in aws_http_client_connections_options.alpn_string_map.
Initialize an map copied from the *src map, which maps struct aws_string *
to enum aws_http_version
.
Asynchronously establish a client connection.
The on_setup callback is invoked when the operation has created a connection or failed.
Begin shutdown sequence of the connection if it hasn’t already started. This will schedule shutdown tasks on the
EventLoop that may send HTTP/TLS/TCP shutdown messages to peers if necessary, and will eventually cause internal
connection memory to stop being accessed and on_shutdown() callback to be called.
Returns the channel hosting the HTTP connection.
Do not expose this function to language bindings.
Returns the remote endpoint of the HTTP connection.
Returns true if this is a client connection.
Returns true unless the connection is closed or closing.
Create a stream, with a client connection sending a request.
The request does not start sending automatically once the stream is created. You must call
aws_http_stream_activate to begin execution of the request.
Fetch the current manager metrics from connection manager.
Return whether the connection can make a new requests.
If false, then a new connection must be established to make further requests.
Users must release the connection when they are done with it.
The connection’s memory cannot be reclaimed until this is done.
If the connection was not already shutting down, it will be shut down.
Stop accepting new requests for the connection. It will NOT start the shutdown process for the connection. The
requests that are already open can still wait to be completed, but new requests will fail to be created,
Return whether both names are equivalent.
This is a case-insensitive string comparison.
Acquire a hold on the object, preventing it from being deleted until
aws_http_headers_release() is called by all those with a hold on it.
Add a header.
The underlying strings are copied.
Add an array of headers.
The underlying strings are copied.
Add a header.
The underlying strings are copied.
Clear all headers.
Get the total number of headers.
Remove all headers with this name.
AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no headers with this name are found.
Remove the header at the specified index.
Remove the first header found with this name and value.
AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if no such header is found.
Get the first value for this name, ignoring any additional values.
AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised if the name is not found.
Get all values with this name, combined into one new aws_string that you are responsible for destroying.
If there are multiple headers with this name, their values are appended with comma-separators.
If there are no headers with this name, NULL is returned and AWS_ERROR_HTTP_HEADER_NOT_FOUND is raised.
Get the header at the specified index.
The index of a given header may change any time headers are modified.
When iterating headers, the following ordering rules apply:
Test if header name exists or not in headers
Create a new headers object.
The caller has a hold on the object and must call aws_http_headers_release() when they are done with it.
Release a hold on the object.
The object is deleted when all holds on it are released.
Set a header value.
The header is added if necessary and any existing values for this name are removed.
The underlying strings are copied.
Clean up internal datastructures used by aws-c-http.
Must not be called until application is done using functionality in aws-c-http.
Initializes internal datastructures used by aws-c-http.
Must be called before using any functionality in aws-c-http.
Acquire a hold on the object, preventing it from being deleted until
aws_http_message_release() is called by all those with a hold on it.
Add a header to the end of the array.
The message makes its own copy of the underlying strings.
Add an array of headers to the end of the header array.
The message makes its own copy of the underlying strings.
Deprecated. This is equivalent to aws_http_message_release().
Remove the header at the specified index.
Headers after this index are all shifted back one position.
Get the body stream.
Returns NULL if no body stream is set.
Get the message’s const aws_http_headers.
Get the header at the specified index.
This function cannot fail if a valid index is provided.
Otherwise, AWS_ERROR_INVALID_INDEX will be raised.
Get the number of headers.
This datastructure has more functions for inspecting and modifying headers than
are available on the aws_http_message datastructure.
Get the protocol version of the http message.
Get the method (request messages only).
Get the status code (response messages only).
If no status is set, AWS_ERROR_HTTP_DATA_NOT_AVAILABLE is raised.
Create a new HTTP/1.1 request message.
The message is blank, all properties (method, path, etc) must be set individually.
If HTTP/1.1 message used in HTTP/2 connection, the transformation will be automatically applied.
A HTTP/2 message will created and sent based on the HTTP/1.1 message.
Like aws_http_message_new_request(), but uses existing aws_http_headers instead of creating a new one.
Acquires a hold on the headers, and releases it when the request is destroyed.
Create a new HTTP/1.1 response message.
The message is blank, all properties (status, headers, etc) must be set individually.
Release a hold on the object.
The object is deleted when all holds on it are released.
Set the body stream.
NULL is an acceptable value for messages with no body.
Note: The message does NOT take ownership of the body stream.
The stream must not be destroyed until the message is complete.
Set the method (request messages only).
The request makes its own copy of the underlying string.
Set the path-and-query value (request messages only).
The request makes its own copy of the underlying string.
Set the status code (response messages only).
Checks http proxy options for correctness
Destroys an http proxy configuration
@param config http proxy configuration to destroy
Clones an existing proxy configuration. A refactor could remove this (do a “move” between the old and new user
data in the one spot it’s used) but that should wait until we have better test cases for the logic where this
gets invoked (ntlm/kerberos chains).
Create a persistent proxy configuration from http connection options
@param allocator memory allocator to use
@param options http connection options to source proxy configuration from
@return
Create a persistent proxy configuration from http connection manager options
@param allocator memory allocator to use
@param options http connection manager options to source proxy configuration from
@return
Create a persistent proxy configuration from non-persistent proxy options.
Legacy connection type of proxy options will be rejected.
Create a persistent proxy configuration from non-persistent proxy options.
Create a persistent proxy configuration from non-persistent proxy options. The resulting
proxy configuration assumes a tunneling connection type.
Take a reference to an http proxy negotiator
@param proxy_negotiator negotiator to take a reference to
@return the strategy
Release a reference to an http proxy negotiator
@param proxy_negotiator negotiator to release a reference to
Establish an arbitrary protocol connection through an http proxy via tunneling CONNECT. Alpn is
not required for this connection process to succeed, but we encourage its use if available.
Initializes non-persistent http proxy options from a persistent http proxy configuration
@param options http proxy options to initialize
@param config the http proxy config to use as an initialization source
Take a reference to an http proxy strategy
@param proxy_strategy strategy to take a reference to
@return the strategy
Creates a new proxy negotiator from a proxy strategy
@param allocator memory allocator to use
@param strategy strategy to creation a new negotiator for
@return a new proxy negotiator if successful, otherwise NULL
A constructor for a proxy strategy that performs basic authentication by adding the appropriate
header and header value to requests or CONNECT requests.
Constructor for an adaptive tunneling proxy strategy. This strategy attempts a vanilla CONNECT and if that
fails it may make followup CONNECT attempts using kerberos or ntlm tokens, based on configuration and proxy
response properties.
Release a reference to an http proxy strategy
@param proxy_strategy strategy to release a reference to
Returns the description of common status codes.
Ex: 404 -> “Not Found”
An empty string is returned if the status code is not recognized.
Acquire refcount on the stream to prevent it from being cleaned up until it is released.
Only used for client initiated streams (immediately following a call to aws_http_connection_make_request).
Cancel the stream in flight.
For HTTP/1.1 streams, it’s equivalent to closing the connection.
For HTTP/2 streams, it’s equivalent to calling reset on the stream with AWS_HTTP2_ERR_CANCEL
.
Gets the HTTP/2 id associated with a stream. Even h1 streams have an id (using the same allocation procedure
as http/2) for easier tracking purposes. For client streams, this will only be non-zero after a successful call
to aws_http_stream_activate()
Create a stream, with a server connection receiving and responding to a request.
This function can only be called from the aws_http_on_incoming_request_fn
callback.
aws_http_stream_send_response() should be used to send a response.
Users must release the stream when they are done with it, or its memory will never be cleaned up.
This will not cancel the stream, its callbacks will still fire if the stream is still in progress.
Send response (only callable from “request handler” streams)
The response object must stay alive at least until the stream’s on_complete is called.
Increment the stream’s flow-control window to keep data flowing.
Increments the ref count on the client
Gets the ami id of the ec2 instance from the instance metadata document
Gets the ami launch index of the ec2 instance from the instance metadata document
Gets the ami manifest path of the ec2 instance from the instance metadata document
Gets the list of ancestor ami ids of the ec2 instance from the instance metadata document
Gets the attached iam role of the ec2 instance from the instance metadata document
Gets the availability zone of the ec2 instance from the instance metadata document
Gets the list of block device mappings of the ec2 instance from the instance metadata document
Gets temporary credentials based on the attached iam role of the ec2 instance
Gets the iam profile information of the ec2 instance from the instance metadata document
Gets the instance-action of the ec2 instance from the instance metadata document
Gets the instance id of the ec2 instance from the instance metadata document
Gets the instance information data block of the ec2 instance from the instance metadata document
Gets the signature of the ec2 instance from the instance metadata document
Gets the instance type of the ec2 instance from the instance metadata document
Gets the mac address of the ec2 instance from the instance metadata document
Gets the private ip address of the ec2 instance from the instance metadata document
Gets the product codes of the ec2 instance from the instance metadata document
Gets the public key of the ec2 instance from the instance metadata document
Gets the ramdisk id of the ec2 instance from the instance metadata document
Gets the reservation id of the ec2 instance from the instance metadata document
Queries a generic resource (string) from the ec2 instance metadata document
Gets the list of the security groups of the ec2 instance from the instance metadata document
Gets the user data of the ec2 instance from the instance metadata document
Creates a new imds client
Decrements the ref count on the client
Increments the reference count on the input stream, allowing the caller to take a reference to it.
Decrements a input stream’s ref count. When the ref count drops to zero, the input stream will be destroyed.
Shuts down the internal datastructures used by aws-c-io.
Initializes internal datastructures used by aws-c-io.
Must be called before using any functionality in aws-c-io.
Returns 1 if machine is big endian, 0 if little endian.
If you compile with even -O1 optimization, this check is completely optimized
out at compile time and code which calls “if (aws_is_big_endian())” will do
the right thing without branching.
Returns whether each byte is zero.
Function to check if x is power of 2
Like isalnum(), but ignores C locale.
Returns true if ch has the value of ASCII/UTF-8: ‘a’-‘z’, ‘A’-‘Z’, or ‘0’-‘9’.
Like isalpha(), but ignores C locale.
Returns true if ch has the value of ASCII/UTF-8: ‘a’-‘z’ or ‘A’-‘Z’.
Like isdigit().
Returns true if ch has the value of ASCII/UTF-8: ‘0’-‘9’.
Like isspace(), but ignores C locale.
Return true if ch has the value of ASCII/UTF-8: space (0x20), form feed (0x0C),
line feed (0x0A), carriage return (0x0D), horizontal tab (0x09), or vertical tab (0x0B).
Like isxdigit().
Returns true if ch has the value of ASCII/UTF-8: ‘0’-‘9’, ‘a’-‘f’, or ‘A’-‘F’.
Returns the element in the back of the list.
Returns an iteration pointer for the first element in the list.
Tests if the list is empty.
Returns an iteration pointer for one past the last element in the list.
Returns the element in the front of the list.
Initializes the list. List will be empty after this call.
Inserts to_add immediately after after.
Inserts to_add immediately before before.
Checks that a linked list is valid.
Checks that a linked list satisfies double linked list connectivity
constraints. This check is O(n) as it traverses the whole linked
list to ensure that tail is reachable from head (and vice versa)
and that every connection is bidirectional.
Remove all nodes from one list, and add them to the back of another.
Remove all nodes from one list, and add them to the front of another.
Returns the next element in the list.
Checks that the prev of the next pointer of a node points to the
node. As this checks whether the [next] connection of a node is
bidirectional, it returns false if used for the list tail.
Checks that the next of the prev pointer of a node points to the
node. Similarly to the above, this returns false if used for the
head of a list.
Set node’s next and prev pointers to NULL.
Returns the element in the back of the list and removes it
Returns the element in the front of the list and removes it
Returns the previous element in the list.
Append new_node.
Prepend new_node.
Returns a pointer for the last element in the list.
Used to begin iterating the list in reverse. Ex:
for (i = aws_linked_list_rbegin(list); i != aws_linked_list_rend(list); i = aws_linked_list_prev(i)) {…}
Removes the specified node from the list (prev/next point to each other) and
returns the next node in the list.
Returns the pointer to one before the first element in the list.
Used to end iterating the list in reverse.
Swaps the order two nodes in the linked list.
Converts a log level to a c-string constant. Intended primarily to support building log lines that
include the level in them, i.e.
Get subject name from log subject.
Cleans up all resources used by the logger; simply invokes the clean_up v-function
Gets the aws logger used globally across the process.
Gets the aws logger used globally across the process if the logging level is at least the inputted level.
Sets the aws logger used globally across the process. Not thread-safe. Must only be called once.
Sets the current logging level for the logger. Loggers are not require to support this.
@param logger logger to set the log level for
@param level new log level for the logger
@return AWS_OP_SUCCESS if the level was successfully set, AWS_OP_ERR otherwise
Returns lookup table to go from ASCII/UTF-8 hex character to a number (0-15).
Non-hex characters map to 255.
Valid examples:
‘0’ -> 0
‘F’ -> 15
‘f’ -> 15
Invalid examples:
’ ’ -> 255
‘Z’ -> 255
‘\0’ -> 255
Returns a lookup table for bytes that is the identity transformation with the exception
of uppercase ascii characters getting replaced with lowercase characters. Used in
caseless comparisons.
Returns at least size
of memory ready for usage. In versions v0.6.8 and prior, this function was allowed to return
NULL. In later versions, if allocator->mem_acquire() returns NULL, this function will assert and exit. To handle
conditions where OOM is not a fatal error, allocator->mem_acquire() is responsible for finding/reclaiming/running a
GC etc…before returning.
Allocates many chunks of bytes into a single block. Expects to be called with alternating void ** (dest), size_t
(size). The first void ** will be set to the root of the allocation. Alignment is assumed to be sizeof(intmax_t).
Allocates a block of memory for an array of num elements, each of them size bytes long, and initializes all its bits
to zero. In versions v0.6.8 and prior, this function was allowed to return NULL.
In later versions, if allocator->mem_calloc() returns NULL, this function will assert and exit. To handle
conditions where OOM is not a fatal error, allocator->mem_calloc() is responsible for finding/reclaiming/running a
GC etc…before returning.
Attempts to adjust the size of the pointed-to memory buffer from oldsize to
newsize. The pointer (*ptr) may be changed if the memory needs to be
reallocated.
Releases ptr back to whatever allocated it.
Nothing happens if ptr is NULL.
Multiplies a * b and returns the result in *r. If the result
overflows, returns AWS_OP_ERR; otherwise returns AWS_OP_SUCCESS.
Multiplies a * b. If the result overflows, returns SIZE_MAX.
If a * b overflows, returns AWS_OP_ERR; otherwise multiplies
a * b, returns the result in *r, and returns AWS_OP_SUCCESS.
Multiplies a * b. If the result overflows, returns 2^32 - 1.
If a * b overflows, returns AWS_OP_ERR; otherwise multiplies
a * b, returns the result in *r, and returns AWS_OP_SUCCESS.
Multiplies a * b. If the result overflows, returns 2^64 - 1.
Cleans up internal resources.
Initializes a new platform instance of mutex.
Blocks until it acquires the lock. While on some platforms such as Windows,
this may behave as a reentrant mutex, you should not treat it like one. On
platforms it is possible for it to be non-reentrant, it will be.
Attempts to acquire the lock but returns immediately if it can not.
While on some platforms such as Windows, this may behave as a reentrant mutex,
you should not treat it like one. On platforms it is possible for it to be non-reentrant, it will be.
Note: For windows, minimum support server version is Windows Server 2008 R2 [desktop apps | UWP apps]
Releases the lock.
Convert 16 bit integer from network to host byte order.
Convert 32 bit integer from network to host byte order.
Convert 64 bit integer from network to host byte order.
Convert 32 bit float from network to host byte order.
Convert 32 bit float from network to host byte order.
Checks that the backpointer at a specific index of the queue is
NULL or points to a correctly allocated aws_priority_queue_node.
Checks that the backpointers of the priority queue satisfy validity
constraints.
Checks that the backpointers of the priority queue are either NULL
or correctly allocated to point at aws_priority_queue_nodes. This
check is O(n), as it accesses every backpointer in a loop, and thus
shouldn’t be used carelessly.
Current allocated capacity for the queue, in dynamic mode this grows over time, in static mode, this will never
change.
Cleans up any internally allocated memory and resets the struct for reuse or deletion.
Removes all elements from the queue, but does not free internal memory.
Initializes a priority queue struct for use. This mode will grow memory automatically (exponential model)
Default size is the inital size of the queue
item_size is the size of each element in bytes. Mixing items types is not supported by this API.
pred is the function that will be used to determine priority.
Initializes a priority queue struct for use. This mode will not allocate any additional memory. When the heap fills
new enqueue operations will fail with AWS_ERROR_PRIORITY_QUEUE_FULL.
Set of properties of a valid aws_priority_queue.
Initializes a queue node to a default value that indicates the node is not in the queue.
Checks if a priority queue node is currently in a priority queue.
Copies the element of the highest priority, and removes it from the queue.. Complexity: O(log(n)).
If queue is empty, AWS_ERROR_PRIORITY_QUEUE_EMPTY will be raised.
Copies item into the queue and places it in the proper priority order. Complexity: O(log(n)).
Copies item into the queue and places it in the proper priority order. Complexity: O(log(n)).
Removes a specific node from the priority queue. Complexity: O(log(n))
After removing a node (using either _remove or _pop), the backpointer set at push_ref time is set
to a sentinel value. If this sentinel value is passed to aws_priority_queue_remove,
AWS_ERROR_PRIORITY_QUEUE_BAD_NODE will be raised. Note, however, that passing uninitialized
aws_priority_queue_nodes, or ones from different priority queues, results in undefined behavior.
Current number of elements in the queue
Obtains a pointer to the element of the highest priority. Complexity: constant time.
If queue is empty, AWS_ERROR_PRIORITY_QUEUE_EMPTY will be raised.
Equality function which compares pointer equality.
For iterating over the params in the query string.
param
is an in/out argument used to track progress, it MUST be zeroed out to start.
If true is returned, param
contains the value of the next param.
If false is returned, there are no further params.
Parses query string and stores the parameters in ‘out_params’. Returns AWS_OP_SUCCESS on success and
AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.
The user is also responsible for cleaning up out_params when finished.
Increments a ref-counter’s ref count
Initializes a ref-counter structure. After initialization, the ref count will be 1.
Decrements a ref-counter’s ref count. Invokes the on_zero callback if the ref count drops to zero
@param ref_count ref-counter to decrement the count for
@return the value of the decremented ref count
TODO: this needs to be a private function (wait till we have the cmake story
better before moving it though). It should be external for the purpose of
other libs we own, but customers should not be able to hit it without going
out of their way to do so.
Connects log subject strings with log subject integer values
Acquire a reference count on retry_strategy.
Attempts to acquire a retry token for use with retries. On success, on_acquired will be invoked when a token is
available, or an error will be returned if the timeout expires. partition_id identifies operations that should be
grouped together. This allows for more sophisticated strategies such as AIMD and circuit breaker patterns. Pass NULL
to use the global partition.
Creates a retry strategy using exponential backoff. This strategy does not perform any bookkeeping on error types and
success. There is no circuit breaker functionality in here. See the comments above for
aws_exponential_backoff_retry_options.
This is a retry implementation that cuts off traffic if it’s
detected that an endpoint partition is having availability
problems. This is necessary to keep from making outages worse
by scheduling work that’s unlikely to succeed yet increases
load on an already ailing system.
Releases a reference count on retry_strategy.
Schedules a retry based on the backoff and token based strategies. retry_ready is invoked when the retry is either
ready for execution or if it has been canceled due to application shutdown.
Increments reference count for token. This should be called any time you seat the token to a pointer you own.
Records a successful retry. This is used for making future decisions to open up token buckets, AIMD breakers etc…
some strategies such as exponential backoff will ignore this, but you should always call it after a successful
operation or your system will never recover during an outage.
Releases the reference count for token. This should always be invoked after either calling
aws_retry_strategy_schedule_retry() and failing, or after calling aws_retry_token_record_success().
Function to find the smallest result that is power of 2 >= n. Returns AWS_OP_ERR if this cannot
be done without overflow
Add a reference, keeping this object alive.
The reference must be released when you are done with it, or it’s memory will never be cleaned up.
You must not pass in NULL.
Always returns the same pointer that was passed in.
Release a reference.
When the reference count drops to 0, this object will be cleaned up.
It’s OK to pass in NULL (nothing happens).
Always returns NULL.
Creates a new S3 endpoint resolver.
Warning: Before using this header, you have to enable it by
setting cmake config AWS_ENABLE_S3_ENDPOINT_RESOLVER=ON
Initialize the configuration for a default S3 signing.
Shuts down the internal datastructures used by aws-c-s3.
Initializes internal datastructures used by aws-c-s3.
Must be called before using any functionality in aws-c-s3.
Add a reference, keeping this object alive.
The reference must be released when you are done with it, or it’s memory will never be cleaned up.
You must not pass in NULL.
Always returns the same pointer that was passed in.
Increment the flow-control window, so that response data continues downloading.
Note: pause is currently only supported on upload requests.
In order to pause an ongoing upload, call aws_s3_meta_request_pause() that
will return resume token. Token can be used to query the state of operation
at the pausing time.
To resume an upload that was paused, supply resume token in the meta
request options structure member aws_s3_meta_request_options.resume_token.
The upload can be resumed either from the same client or a different one.
Corner cases for resume upload are as follows:
Release a reference.
When the reference count drops to 0, this object will be cleaned up.
It’s OK to pass in NULL (nothing happens).
Always returns NULL.
Create upload resume token from persisted data.
Note: Data required for resume token varies per operation.
Write the next chunk of data.
Add a reference, keeping this object alive.
The reference must be released when you are done with it, or it’s memory will never be cleaned up.
Always returns the same pointer that was passed in.
Get the host_address of the request.
If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.
If available, out_host_address will be set to a string. Be warned this string’s lifetime is tied to the metrics
object.
Get the IP address of the request connected to.
If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.
If available, out_ip_address will be set to a string. Be warned this string’s lifetime is tied to the metrics object.
Get the S3 operation name of the request (e.g. “HeadObject”).
If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.
If available, out_operation_name will be set to a string.
Be warned this string’s lifetime is tied to the metrics object.
Getters for s3 request metrics **********************************************/
/
Get the request ID from aws_s3_request_metrics.
If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.
If available, out_request_id will be set to a string. Be warned this string’s lifetime is tied to the metrics
object.
Get the path and query of the request.
If unavailable, AWS_ERROR_S3_METRIC_DATA_NOT_AVAILABLE will be raised.
If available, out_request_path_query will be set to a string. Be warned this string’s lifetime is tied to the metrics
object.
Release a reference.
When the reference count drops to 0, this object will be cleaned up.
It’s OK to pass in NULL (nothing happens).
Always returns NULL.
Return operation name for aws_s3_request_type,
or empty string if the type doesn’t map to an actual operation.
For example:
AWS_S3_REQUEST_TYPE_HEAD_OBJECT -> “HeadObject”
AWS_S3_REQUEST_TYPE_UNKNOWN -> “”
AWS_S3_REQUEST_TYPE_MAX -> “”
Computes the length of a c string in bytes assuming the character set is either ASCII or UTF-8. If no NULL character
is found within max_read_len of str, AWS_ERROR_C_STRING_BUFFER_NOT_NULL_TERMINATED is raised. Otherwise, str_len
will contain the string length minus the NULL character, and AWS_OP_SUCCESS will be returned.
Securely zeroes a memory buffer. This function will attempt to ensure that
the compiler will not optimize away this zeroing operation.
Increments a server bootstrap’s ref count, allowing the caller to take a reference to it.
Shuts down ‘listener’ and cleans up any resources associated with it. Any incoming channels on listener
will still
be active. destroy_callback
will be invoked after the server socket listener is destroyed, and all associated
connections and channels have finished shutting down.
Initializes the server bootstrap with allocator
and el_group
. This object manages listeners, server connections,
and channels.
Sets up a server socket listener. If you are planning on using TLS, use
aws_server_bootstrap_new_tls_socket_listener
instead. This creates a socket listener bound to local_endpoint
using socket options options
. incoming_callback
will be invoked once an incoming channel is ready for use or if
an error is encountered. shutdown_callback
will be invoked once the channel has shutdown. destroy_callback
will
be invoked after the server socket listener is destroyed, and all associated connections and channels have finished
shutting down. Immediately after the shutdown_callback
returns, the channel is cleaned up automatically. All
callbacks are invoked the thread of the event-loop that the listening socket is assigned to
Decrements a server bootstrap’s ref count. When the ref count drops to zero, the bootstrap will be destroyed.
When using TLS, if ALPN is used, this callback will be invoked from the channel. The returned handler will be added
to the channel.
Returns a c-string that describes the supplied signing algorithm
Equivalent to str->bytes.
Equivalent to (const char *)str->bytes
.
If the string was dynamically allocated, clones it. If the string was statically allocated (i.e. has no allocator),
returns the original string.
Compares lexicographical ordering of two strings. This is a binary
byte-by-byte comparison, treating bytes as unsigned integers. It is suitable
for either textual or binary data and is unaware of unicode or any other byte
encoding. If both strings are identical in the bytes of the shorter string,
then the longer string is lexicographically after the shorter.
Deallocate string.
Zeroes out the data bytes of string and then deallocates the memory.
Not safe to run on a string created with AWS_STATIC_STRING_FROM_LITERAL.
Returns true if bytes of string are the same, false otherwise.
Returns true if bytes of string and buffer are the same, false otherwise.
Returns true if bytes of string and buffer are equivalent, using a case-insensitive comparison.
Returns true if bytes of string and cursor are the same, false otherwise.
Returns true if bytes of string and cursor are equivalent, using a case-insensitive comparison.
Returns true if bytes of strings are equivalent, using a case-insensitive comparison.
Returns true if bytes of string are equivalent, using a case-insensitive comparison.
Evaluates the set of properties that define the shape of all valid aws_string structures.
It is also a cheap check, in the sense it run in constant time (i.e., no loops or recursion).
Allocate a new string with the same contents as array.
Allocate a new string with the same contents as buf.
Constructor functions which copy data from null-terminated C-string or array of bytes.
Allocate a new string with the same contents as cursor.
Allocate a new string with the same contents as another string.
Converts a c-string constant to a log level value. Uses case-insensitive comparison
and simply iterates all possibilities until a match or nothing remains. If no match
is found, AWS_OP_ERR is returned.
If a - b overflows, returns AWS_OP_ERR; otherwise subtracts
a - b, returns the result in *r, and returns AWS_OP_SUCCESS.
Subtracts a - b. If the result overflows returns 0.
If a - b overflows, returns AWS_OP_ERR; otherwise subtracts
a - b, returns the result in *r, and returns AWS_OP_SUCCESS.
Subtracts a - b. If the result overflows returns 0.
If a - b overflows, returns AWS_OP_ERR; otherwise subtracts
a - b, returns the result in *r, and returns AWS_OP_SUCCESS.
Subtracts a - b. If the result overflows returns 0.
Init an aws_task
Removes task from the scheduler and invokes the task with the AWS_TASK_STATUS_CANCELED status.
Empties and executes all queued tasks, passing the AWS_TASK_STATUS_CANCELED status to the task function.
Cleans up any memory allocated, and prepares the instance for reuse or deletion.
Returns whether the scheduler has any scheduled tasks.
next_task_time (optional) will be set to time of the next task, note that 0 will be set if tasks were
added via aws_task_scheduler_schedule_now() and UINT64_MAX will be set if no tasks are scheduled at all.
Initializes a task scheduler instance.
Sequentially execute all tasks scheduled to run at, or before current_time.
AWS_TASK_STATUS_RUN_READY will be passed to the task function as the task status.
Schedules a task to run at time_to_run.
The task should not be cleaned up or modified until its function is executed.
Schedules a task to run immediately.
The task should not be cleaned up or modified until its function is executed.
Convert a status value to a c-string suitable for logging
Cleans up the thread handle. Don’t call this on a managed thread. If you wish to join the thread, you must join
before calling this function.
Adds a callback to the chain to be called when the current thread joins.
Callbacks are called from the current thread, in the reverse order they
were added, after the thread function returns.
If not called from within an aws_thread, has no effect.
Gets name of the current thread.
Caller is responsible for destroying returned string.
If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is
set to NULL.
If underlying OS call fails, AWS_ERROR_SYS_CALL_FAILURE will be raised
If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED
will be raised
Sleeps the current thread by nanos.
Returns the thread id of the calling thread.
Decrements the count of unjoined threads in the managed thread system. Used by managed threads and
event loop threads. Additional usage requires the user to join corresponding threads themselves and
correctly increment/decrement even in the face of launch/join errors.
Gets the detach state of the thread. For example, is it safe to call join on
this thread? Has it been detached()?
Gets the id of thread
Converts an aws_thread_id_t to a c-string. For portability, aws_thread_id_t
must not be printed directly. Intended primarily to support building log
lines that include the thread id in them. The parameter buffer
must
point-to a char buffer of length bufsz == AWS_THREAD_ID_T_REPR_BUFSZ
. The
thread id representation is returned in buffer
.
Increments the count of unjoined threads in the managed thread system. Used by managed threads and
event loop threads. Additional usage requires the user to join corresponding threads themselves and
correctly increment/decrement even in the face of launch/join errors.
Initializes a new platform specific thread object struct (not the os-level
thread itself).
Joins the calling thread to a thread instance. Returns when thread is
finished. Calling this from the associated OS thread will cause a deadlock.
Blocking call that waits for all managed threads to complete their join call. This can only be called
from the main thread or a non-managed thread.
Creates an OS level thread and associates it with func. context will be passed to func when it is executed.
options will be applied to the thread if they are applicable for the platform.
Gets name of the thread.
Caller is responsible for destroying returned string.
If thread does not have a name, AWS_OP_SUCCESS is returned and out_name is
set to NULL.
If underlying OS call fails, AWS_ERROR_SYS_CALL_FAILURE will be raised
If OS does not support getting thread name, AWS_ERROR_PLATFORM_NOT_SUPPORTED
will be raised
Overrides how long, in nanoseconds, that aws_thread_join_all_managed will wait for threads to complete.
A value of zero will result in an unbounded wait.
Compare thread ids.
Convert a c library io error into an aws error, and raise it.
If no conversion is found, AWS_ERROR_SYS_CALL_FAILURE is raised.
Always returns AWS_OP_ERR.
Convert a c library io error into an aws error, and raise it.
If no conversion is found, fallback_aws_error_code is raised.
Always returns AWS_OP_ERR.
Disconnects log subject strings with log subject integer values
Returns the authority portion of the uri (host[:port]). If it was not present, this was a request uri. In that
case, the value will be empty.
Returns the ‘host_name’ portion of the authority. If no authority was present, this value will be empty.
Initializes uri to values specified in options. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.
After calling this function, the parts can be accessed.
Parses ‘uri_str’ and initializes uri. Returns AWS_OP_SUCCESS, on success, AWS_OP_ERR on failure.
After calling this function, the parts can be accessed.
Returns the path portion of the uri, including any leading ‘/’. If not present, this value will be empty.
Returns the path and query portion of the uri (i.e., the thing you send across the wire).
Returns the port portion of the authority if it was present, otherwise, returns 0.
If this is 0, it is the users job to determine the correct port based on scheme and protocol.
Returns the query string portion of the uri, minus the ‘?’. If not present, this value will be empty.
For iterating over the params in the uri query string.
param
is an in/out argument used to track progress, it MUST be zeroed out to start.
If true is returned, param
contains the value of the next param.
If false is returned, there are no further params.
Parses query string and stores the parameters in ‘out_params’. Returns AWS_OP_SUCCESS on success and
AWS_OP_ERR on failure. The user is responsible for initializing out_params with item size of struct aws_query_param.
The user is also responsible for cleaning up out_params when finished.
Returns the scheme portion of the uri (e.g. http, https, ftp, ftps, etc…). If the scheme was not present
in the uri, the returned value will be empty. It is the users job to determine the appropriate defaults
if this field is empty, based on protocol, port, etc…
Checks a signing configuration for invalid settings combinations.